使用我当前的代码,我可以发送密件抄送,但我想发送抄送,我该怎么做。
我尝试使用 [string.split(",")] 拆分邮件。虽然它说它无法处理列表。由于我是初学者 python 程序员,这是我能做的最大的事情。
'''python 导入 smtplib
to_send = input("谁发送") 类邮件:
def send_bcc(which_mail_service,your_mailing_address,password,subject,body):
try:
with smtplib.SMTP(f"smtp.{which_mail_service}.com", 587) as smtp:
smtp.ehlo()
smtp.starttls()
smtp.ehlo()
smtp.login(your_mailing_address,password)
msg = ("Subject:" + subject + "\n\n" + body)
smtp.sendmail(your_mailing_address, to_send, msg)
smtp.quit()
print("Your mail sent.")
except KeyError:
print("The Email not found.")
mail.send_bcc("gmail", "rajdipshah6@gmail.com", "face book", to_send[0], "bla")
mail.send_bcc(“gmail”,“rajdipshah6@gmail.com”,“脸书”,to_send[0],“bla”,“bbla”)'''
我如何发送 cc [一次多封邮件]