繁体   English   中英

Automating email through python with smtplib, using sending from gmail sending to iusd (school district), does not go through

[英]Automating email through python with smtplib, using sending from gmail sending to iusd (school district), does not go through

我正在尝试自动化电子邮件,但我将其从 gmail.com 发送到 iusd.org(学区)。 到目前为止,当我从 gmail 发送到另一个 gmail 帐户时,它起作用了,但是当我尝试发送到 iusd.org 帐户时它没有发送。 我需要更改什么才能发送? 我可以发送的电子邮件数量是否有上限? 我有大约 110 人正在尝试通过这个 email。

> import smtplib
> 
> server = smtplib.SMTP_SSL("smtp@gmail.com",465)
> server.login("myemail@gmail.com","mypassword")
> 
> messages =
> {"otheremail@iusd.org":"www.googlesheets.com","otheremail2@iusd.org":"www.googlesheets.com"}
> for email, link in messages.items():   
>     link = "Hello there, \n \n Attached is a link to your your spreadsheet: \n" + link + "\n \n
>     Sincerely, \n John"   
>     server.sendmail("myemail@gmail.com",email,link)
> server.quit()

首先认为我会尝试将调试级别更改为 1(或更好的 2)。 来自官方文档:

SMTP.set_debuglevel(级别):

设置调试 output 级别。 level 的值 1 或 True 会导致连接调试消息以及发送到服务器和从服务器接收的所有消息。 级别的值为 2 会导致这些消息被加上时间戳。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM