Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send email via the Mandrill API containing multiple BCC addresses

Is their any way to send email via the Mandrill API which contain multiple BCC address? Mandrill API documentation displays only a single bcc_address in their API. So is it not possible send email which contain multiple BCC addresses?

like image 877
Lizza Avatar asked Aug 13 '13 14:08

Lizza


People also ask

How do I send an email using Mandrill API?

Click on “Launch Mandrill”. Click on “Setup your sending domain” button and add your domain name. It will ask you the email associated with the domain name in order to verify it. It will send you an email, click on the link to verify your account.

What is Mandrill API?

Mandrill is a transactional email API for MailChimp users. It's reliable, powerful, and ideal for sending data driven emails, including targeted e-commerce and personalized one-to-one messages.

What is mandrill SMTP?

Mandrill by MailChimp is one of such options. It is a transactional mail distribution service that allows for sending up to 12,000 free e-mails per month. All you need is change SMTP credentials in your application or e-mail client.


1 Answers

Yup totally doable! According to the Mandrill API send documentation, you can specify multiple addresses in the to field, and mark them as type bcc.

Here's an example:

{
   "to":[
      {
         "email":"[email protected]",
         "name":"Recipient Name",
         "type":"to"
      },
      {
         "email":"[email protected]",
         "name":"BCC Recipient Name 1",
         "type":"bcc"
      },
      {
         "email":"[email protected]",
         "name":"BCC Recipient Name 2",
         "type":"bcc"
      }
   ]
}

Hope this helps.

Also make sure you're passing the value "preserve_recipients": true under the message section.

like image 103
Anirvan Avatar answered Oct 13 '22 08:10

Anirvan