Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django - Sending Bulk Mails using django-mailer

I am using django-mailer for sending emails. I have cron job running to send mails from the queue every minute. I use GMail's SMTP server to send mails. django-mailer will send mails one by one. The issue is each e-mail is taking 3-5 seconds to be sent. Is there anyway to send these emails in parallel? My requirement is send at-least 150 mails per minute.

like image 570
Sivasubramaniam Arunachalam Avatar asked Nov 20 '25 06:11

Sivasubramaniam Arunachalam


1 Answers

You have to queue your outbound emails and then either use a number of SMTPs in a round-robin fashion, or single SMTP that allows parallel connections (I'm not sure if it's possible according to the relevant RFC).

Or you can install e.g. Postfix and make your Django app relay emails to it. Then it's a matter of Postfix configuration.

like image 192
Tomasz Zieliński Avatar answered Nov 22 '25 00:11

Tomasz Zieliński



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!