Mirza Delic
Mirza Delic

Reputation: 4339

force mandrill API send mails, not django with smtp

Can django send data to Mandrill, so it will take care about sending mails? When i do with SMTP, I need to wait to page send mails(over 1000 mails).

I use django framework.

Is this possible?

Upvotes: 1

Views: 721

Answers (1)

Mirza Delic
Mirza Delic

Reputation: 4339

Fixed it with bcc and preserve recipients:

msg = EmailMultiAlternatives(subject, plain_body, from_email, emails, headers={'X-MC-PreserveRecipients': False})
msg.attach_alternative(html_body, "text/html")
msg.send()

Upvotes: 1

Related Questions