0

I have managed to run a python script that will allow me to send mails automatically with an attachment using the cron command; only I would like to use it to send this same mail to several recipients at the same time. This will save me a lot of time. Thank you for your help.

Barbosa
  • 19
  • 5
  • Possible duplicate of [How to send email to multiple recipients using python smtplib?](https://stackoverflow.com/questions/8856117/how-to-send-email-to-multiple-recipients-using-python-smtplib) – SiHa Sep 11 '17 at 14:26

1 Answers1

1

To send the email to multiple users you can include them together in a string with each email seperated by comma. Please try:

recipients = ["email1", "email2"]
toaddr = ", ".join(recipients)
v.coder
  • 1,822
  • 2
  • 15
  • 24