parse.com - mc:edit do not work in Mailchimp template with Mandrill Javascript API -


I am trying to send email via Mandil API with Mailchimp templates. I'm doing it in cloud code with Parse.com, see here. Emails are sent properly, however, MC: Editing fields are never updated, this is the only content in the template:

  & lt; Span mc: edit = "ship_id" & gt; Ship_id & lt; / Span & gt;   

My column in JavaScript looks like this, hopefully someone sees my fault. I'm running it in Parse.com cloud code if it makes a difference Thanks a lot! var Mandel = Required ('mandrel'); Mandrill.initialize ('API key'); Mandrill.sendTemplate ({template_name: "Drip campaign", template_content: [{name: "ship_id", content: "test test"}, message: {text: "hi", subject: "you have a new mail" From: email: "info@example.com", to_name: "Thomas", for: [{email: "answer@example.com", name: "fred"}], "header": {"answer-per": "Success" (httpResponse) {response.success ("Email Sent!"), "Important": Incorrect, "Track_pence": True, "Track_clix": true,}, async: true}, {success: Function (httpResponse);}, error: function (httpResponse) {console.error (httpResponse); response. ("Uh oh, something went wrong");}}); }

As far as I understand from my question that you send e-mails At the same time you want to edit the mail content dynamically as you have already used, you can do it through Mandil API. I suggest you to use JS files in the link Can be downloaded;

With the JS file in the GTUB account, you can send mail content to You can dynamically edit (your template) using the tag mc: edit.

The working copy of the code for my case is below;

  Parse.Cloud.define ("sendMail", function (request, response) {var Mandrill = Required ('cloud / mandrillSend.js'); var sentTo = // mail address sent var Var subject = // mail subject var to email = // email var with name = // in name var sentToName = // Request full name = // Full name Mandrill.initialize ('your Mandil API key'); Mandrill.sendTemplate ({Template_name: "MANDRIL TEMPLATE", template_content: [name: "nameHeader", content: sentToName, {}: "name": "mail", content: sent,}, "key": "your Mandil API key ", Message: {subject: subject, from_mail: e-mail, from_name: senam, to: [{email: sent Gone, name: full name}], important: true}, async: false}, {success: function (ht TpResponse) {console.log (httpResponse); Response.success ("email sent!");}, Error: Function (httpResponse) {console.error (httpResponse); Response: Terror ("Uh oh, something went wrong");}});}); For example, Mandrdil template has a duration with ID;  
  & lt; Span mc: edit = "mail" & gt; Test@gmail.com< / Span & gt;   

Hope it helps Regards.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -