import smtplib
SERVER = "localhost"
FROM = "sender@example.com"
TO = ["user@example.com"]
SUBJECT = "Hello!"
TEXT = "This message was sent with Python's smtplib."
server = smtplib.SMTP(SERVER)
server.sendmail(FROM, TO, message)
server.quit()
Run Code Online (Sandbox Code Playgroud)
这是错误的:
'**The debugged program raised the exception unhandled AttributeError
"'module' object has no attribute 'SMTP'"
File: /home/an/Desktop/email.py, Line: 13**'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2512 次 |
| 最近记录: |