-1
如何在下面格式化CC列表?python and email.utils - 如何添加CC列表
我應該加'CC:[email protected]; [email protected]'嗎?
CC = ['[email protected]','[email protected]']
header = 'To:' + TO_ADDRESS + '\n' + 'From: ' + FROM_ADDRESS + '\n' + 'Subject:' + SUB_ADD + '\n'
msg = header + '\n' + TEXT_INSERT'server = smtplib.SMTP('smtp.gmail.com', 587)
server.ehlo()
server.starttls()
server.ehlo()
server.login(FROM_ADDRESS, PASSWORD)
server.sendmail(FROM_ADDRESS, TO_ADDRESS, msg)
server.close()