jackfrued / jackfrued/Python-100-Days

邮件发送失败,554 DT:SPM 发送的邮件内容包含了未被许可的信息,或被系统识别为垃圾邮件.请检查

Open
#255 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
187k
Forks
55.8k
PR merge metrics
No merged PRs in 30d

Description

看下我的代码哪有问题
错误是554如上;
`from smtplib import SMTP
from email.header import Header
from email.mime.text import MIMEText

def main():
# 请自行修改下面的邮件发送者和接收者
sender = 'initsself@163.com'
receivers = ['278617803@qq.com']
message = MIMEText('554 DT:SPM 发送的邮件内容包含了未被许可的信息,或被系统识别为垃圾邮件。请检查是否有用户发送病毒或者垃圾邮件;', 'plain', 'utf-8')
message['From'] = Header( "wumianinitsself@163.com", 'utf-8')
message['To'] = Header("qishi278617803@qq.com", 'utf-8')
message['Subject'] = Header('示例代码实验邮件', 'utf-8')
smtper = SMTP('smtp.163.com')
# 请自行修改下面的登录口令
smtper.login(sender, 'xxxxxxx')
smtper.sendmail(sender, receivers, message.as_string())
print('邮件发送完成!')

if name == 'main':
main()`

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the inline Python SMTP example, especially the connection, login, message construction, and sendmail call, then compare the reported 554 response with the provider's rejection guidance. Done means determining whether the failure comes from the code or the provider's spam/content policy and documenting the needed correction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.