Solved Provide multiple email recepients in python script

December 26, 2014 at 12:14:39
Specs: Windows 7, 8 Gb

I am using python email program which works find when I have 1 recepient BUT fails when I have 2. Could someone please help me to resolve the issue? Here's the code:

#Create the container (outer) email message.
msg = MIMEMultipart()
msg['Subject'] = subject
me = "user1@com"
recepient = "user1@hotmailcom;user2@hotmail.com"
msg['From'] = me
msg['To'] = ''.join(recepient)


See More: Provide multiple email recepients in python script

Report •


#1
December 26, 2014 at 16:35:53
✔ Best Answer
I fixed the problem:
replacing ; with , and replacing string with list fixed the issue. Thanks, I'm all set
Ticket could be closed.

Report •
Related Solutions


Ask Question