mandrill

Conditional content in Mandrill template

半城伤御伤魂 提交于 2019-12-06 07:08:17
问题 I am handing over dictionary keys (key value pair) to a service which in turn utilizes the api to send the email via Mandrill. Now, if my key is blank then i dont want it to be included in the email. Like in the following scenario, i only want the link text to display if my key has some value. <a href=" |UPDATE_PROFILE| " target="_blank" >change subscription preferences</a> How can i write it some thing like or even is this possible? if *|UPDATE_PROFILE|* IS NOT EMPTY BEGIN <a href="*|UPDATE

Sending email with Mandrill using PHP

旧时模样 提交于 2019-12-06 02:59:47
问题 I'm trying to send email using Mandrill and PHP and I can't get it to send. I've downloaded the PHP API wrapper from here:https://packagist.org/packages/mandrill/mandrill Mandrill.php is in my root and the Mandrill folder is in the same directory. Here's my code: <?php require_once 'Mandrill.php'; $mandrill = new Mandrill('MY API KEY IS USUALLY HERE'); $message = array( 'subject' => 'Test message', 'from_email' => 'jwjody@yahoo.com', 'from_name' => 'Sender person', 'html' => '<p>this is a

Extra “\n ” in Mandrill raw_message break some links

余生颓废 提交于 2019-12-06 02:47:53
问题 I am sending e-mails from a Rails app on Heroku to Mandrill via SMTP. Everything has been working fine for a while, but recently (detected 2 days ago), we received reports that some links are broken. When I send the message to Mailtrap, also via SMTP, the raw message is fine, with the HTML body in 1 single line. On Mandrill however, the raw_message that appears in the API call contains extra \n (that's a newline followed by a space). A little bit of bad luck, and a link appears like this: <a

Delayed job and Mandrill: uninitialized constant Mandrill::API

烂漫一生 提交于 2019-12-05 21:20:37
I have mailer service where users can upload an .xls file with emails and some other user related data to send an email campaign. I was having some timeout issues since it takes some seconds to process (as I do some validation and configuration for each email to be sent, eg: save records to database, check if an email was sent in the last 30 days, create personalised html code for each email (to create links that contain the email address as a parameter, etc). After some research, moving this to a delayed job seemed reasonable, as suggested in this rails cast . The only problem is that I am

Get “invalid-sender” error in Mandrill when try to send template

只愿长相守 提交于 2019-12-05 18:06:11
I have 4 templates but one returns error: "reject_reason": "invalid-sender" . I didn't find this error. in Docs. I have 4 templates in my account and current template has following structure: Template Slug: contact-home From Address : info@somecomp.com From Name: SOME_COMP ++ template as HTML. This is a request I send from API Logs: Full Request { "template_name": "contact-home", "template_content": [ { "name": "example name", "content": "example content" } ], "message": { "dest_mail": "mymail@gmail.com", "merge": "true", "to": [ { "email": "mymail@gmail.com" } ], "merge_vars": [ { "rcpt":

Mandrill ValidationError

▼魔方 西西 提交于 2019-12-05 15:36:19
问题 Very excited to be asking my first question on StackOverflow. I've been relying on it to teach myself quite a lot over the years! My question is this. I am getting the following error when trying to send a mail through Mandrill's API: {"status":"error","code":-1,"name":"ValidationError","message":"You must specify a key value"} The code that follows is what I am using to try to send the mail: <?php $to = 'their@email.com'; $content = '<p>this is the emails html <a href="www.google.co.uk"

Mandrill Status: queued

走远了吗. 提交于 2019-12-05 15:35:47
I'm testing the Mandrill API and sent an email to my GMail account. In the API logs, it says: "status": "queued" According to https://mandrill.zendesk.com/hc/en-us/articles/205582717-Why-does-a-delivered-message-say-queued- : most times Mandrill can send email much faster than recipient servers are able to accept or process it GMail is not able to handle my one email that I sent? A queued response in the Mandrill API is not the same as a queued response from a recipient server. When you send a message through Mandrill, you first relay it to Mandrill, Mandrill processes it, and then Mandrill

How to add params to all links in a mandrill template through API?

只愿长相守 提交于 2019-12-05 12:17:06
I need to add some params to all links from a Mandrill template before sending. For example, in the template there are anchors like <a href="http://google.com>click here</a>" . What I need is to add a string (set of params to every anchor), like this: <a href="http://google.com?param1=value1&param2=value2>click here</a>" , dynamically Is there a way to do it through the API? Something similar to X-MC-GoogleAnalyticsCampaign which adds the utm_campaign param. Sure, you can use merge tags to do this. Your link would look something like this: <a href="http://google.com?param1=*|PARAM1|*&param2=*

Mandrill Editable Template: mc:edit link href

核能气质少年 提交于 2019-12-05 09:43:53
I'm trying to use Mandrill templates to send order tracking emails. Using the mc:edit works well for simple text like <span mc:edit="ship_id">ship_id</span><br> I was wondering if there was a way to pass the href link in a variable i.e. tracking_url <a class="mcnButton " title="Track order" href=tracking_url target="_blank" style="font-weight: bold;text-align: center;">Track Order</a> I'm using Djrill for Django and here's the code which sends the email so far, and I'd like to add tracking_url as a template_content variable or something similar msg = EmailMessage(subject="Track your order",

Subject encoding on SmtpClient/MailMessage

放肆的年华 提交于 2019-12-05 05:15:10
I am trying to send emails that contain non-ASCII characters using the SmtpClient and MailMessage classes. I am using an external mailing service ( MailChimp ) and some of my emails have been rejected by their SMTP server. I have contacted them and this is what they replied: It appears the subject line is being Base64 encoded and then Quoted-Printable encoded, which generally should be fine, but one of the characters is being broken across two lines. So when your subject lines are a bit longer, in order to be processed correctly, it's broken on to two lines. When using UTF-8 quoted printable