The first mail is [email protected] receive,
But the second is a receipt, b also receive the
Third is a received, b received, c also received,
Why is this?
I meant I hope a received an email, receive a b, c received a
Try:
Member=[" [email protected] ", "[email protected]", "[email protected]"]
For to_mail member in:
A=a + 1
Subject=STR (a) + '- Python email -' + nowtime
The message [' To ']=Header (to_mail)
Message=[' Subject '] Header (Subject, 'utf-8') # mail title
STMP. Sendmail (from_addr to_mail, message. As_string ())
# print (subject, to_mail)
Print (to_mail + ', '+ STR (a) +' - email sent successfully, nowtime)
Time. Sleep (0.1)
CodePudding user response:
Don't need To traverse, the message [' To ']=Header (to_mail), to_mail received here is a list of all you have To do is To come in, do not need To traverse, can tell you the debug Header parameter typesCodePudding user response:
Member=[" [email protected] ", "[email protected]", "[email protected]"]
Subject=STR (a) + '- Python email -' + nowtime
The message [' To ']=Header (member)
Message=[' Subject '] Header (Subject, 'utf-8') # mail title
STMP. Sendmail (from_addr to_mail, message. As_string ())
Print (to_mail + ', '+ STR (a) +' - email sent successfully, nowtime)
CodePudding user response: