AttributeError: 'tuple' object has no attribute 'encode'
根据提示初步判断跟类型或者编码有关。
使用join方法解决,确实有效。
to_addr = ["xxxxxxxxx@163.com", "xxxxxxxxx@qq.com"]
msg['To'] = ','.join(to_addr)
直接输入***一整个字符串 ***,中间以逗号分割。经测试成功发送。
msg['To'] = "xxxxxxxxx@163.com, xxxxxxxxx@qq.com"
本文地址:https://blog.csdn.net/qq_40674586/article/details/107056128
如对本文有疑问, 点击进行留言回复!!
pycharm 2020 Error: failed to send plot to http://127.0.0.1:63342
网友评论