I'm working on someone else's script and need to update the config.json file to contain multiple e-mail addresses. The e-mail module uses smtplib and the 'to_address' is contained in config.json. It works fine with the only a single address, but I'm stuck on how to make it use multiple ones.
config.json entry that works:
"smtp_to_address": "Joe.Blow@Kokomo.ca"
How I thought it should look:
"smtp_to_address": "Joe.Blow@Kokomo.ca, hotmale@hotmail.com, favourable@outlook.com"
I also tried:
"smtp_to_address": ["Joe.Blow@Kokomo.ca, hotmaile@hotmail.com, favourable@outlook.com"]
It only sends to Joe Blow.
I needed to put quotes around each e-mail address as illustrated below:
"smtp_to_address": ["Joe.Blow@Kokomo.ca", "hotmaile@hotmail.com", "favourable@outlook.com"]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.