我创建了一个 python 脚本来使用 gmail 帐户发送电子邮件。我使用的是 Python 3.7,但是当我去运行该程序时,它"EOL while scanning string literal"在消息框中说。任何人都可以解决这个问题吗?告诉我你是否找到了解决它的方法。
import smtplib
server = smtplib.SMTP('smtp.gmail.com', 587)
#Next, log in to the server
server.login("youremailusername", "password")
#Send the mail
msg = "
Hello!" # The /n separates the message from the headers
server.sendmail("you@gmail.com", "target@example.com", msg)
繁星点点滴滴
杨魅力
相关分类