简体   繁体   English

Python 在没有现有电子邮件的情况下发送电子邮件?

[英]Python sending E-Mail without an existing E-Mail?

I already learned to send E-Mails with python using my existing E-Mail address as the sender.我已经学会了使用我现有的电子邮件地址作为发件人发送带有 python 的电子邮件。

  1. Is it possible to send E-Mails without an existing E-Mail address (like YoK23L1s-kis@outlook.com or even loxzy22_2osy@xyza.ccc )?是否可以在没有现有电子邮件地址的情况下发送电子邮件(例如YoK23L1s-kis@outlook.com甚至loxzy22_2osy@xyza.ccc )? Or is it necessary to sign up at an E-mail provider like gmail/outlook/...?或者是否有必要在像 gmail/outlook/...这样的电子邮件提供商处注册?

  2. If it is necessary, is it possible to generate an E-Mail address with Python?如果有必要,是否可以生成一个带有 Python 的 E-Mail 地址?

  3. How do spammers create their E-Mail addresses?垃圾邮件发送者如何创建他们的电子邮件地址? They look so random as they are generated.它们在生成时看起来非常随机。

Your question is off-topic, as it's not directly programming related, and it's also a fairly large question.您的问题是题外话,因为它与编程没有直接关系,而且它也是一个相当大的问题。 You may get faster and more detailed answers in a web search.您可以在 web 搜索中获得更快、更详细的答案。

Mail servers will not accept emails without a sender.邮件服务器不会接受没有发件人的电子邮件。 This is because in case they cannot deliver the email, they need to bounce it (return it to the sender).这是因为如果他们无法交付 email,他们需要退回它(将其退回给发件人)。 You can leave out the FROM: header, and that may make you look like a spammer or poor sender, but you need to pass a MAIL FROM: <me@example.org> SMTP command when you try to deliver mail;您可以省略FROM: header,这可能会让您看起来像垃圾邮件发送者或糟糕的发件人,但您需要在尝试投递邮件时传递MAIL FROM: <me@example.org> SMTP 命令; see RFC 5321参见RFC 5321

You can generate any email address you want (see RFC 2822 for syntax details).您可以生成任何您想要的 email 地址(有关语法详细信息,请参阅RFC 2822 )。 The receiver has no way to tell whether that is a valid email address.接收方无法判断这是否是有效的 email 地址。 Only your (incoming) mail server decides whether to accept mail for an address.只有您的(传入)邮件服务器决定是否接受某个地址的邮件。 If you run your own email sender you're in charge of the addresses.如果您运行自己的 email 发件人,则您负责地址。

If you don't run your own email server, you can use someone else's, like Google or sendgrid.如果您不运行自己的 email 服务器,则可以使用其他人的服务器,例如 Google 或 sendgrid。 In that case these companies assign you email addresses you can use, and they will require you to log in before you can send, so that others cannot send in your name.在这种情况下,这些公司为您分配了您可以使用的 email 地址,并且他们会要求您先登录才能发送,这样其他人就无法以您的名义发送。 (Imagine if everybody could send emails coming from your bank.) (想象一下,如果每个人都可以发送来自您银行的电子邮件。)

Spammers either run their own mail server, or abuse poorly configured mail servers that allow relaying for others (open relays), or sign up for email services and blast out as much as they can before the email service provider kicks them off of their platform.垃圾邮件发送者要么运行自己的邮件服务器,要么滥用配置不当的邮件服务器,允许为他人中继(开放中继),或者注册 email 服务并在 email 服务提供商将他们踢出他们的平台之前尽可能多地爆发。

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

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