Python email

Email process:

Let's say our own email address is[email protected]

    Email software is called MUA : Mail User Agent - Mail User Agent . ( Outlookor Foxmailsimilar software )

    Email is sent from MUA, not directly to the other party's computer, but to MTA : Mail Transfer Agent - Mail Transfer Agent , that is, Email service providers, such as Netease, Sina, etc., because their own email is 163.com, so, Email It is first delivered to the MTA provided by NetEase, and then sent by NetEase's MTA to the other service provider, Sina's MTA. There may be other MTAs in the middle of the process.

    After the Email arrives at Sina's MTA, because the other party uses the @sina.comsame mailbox, Sina's MTA will deliver the Email to the final destination of the mail, MDA : Mail Delivery Agent - Mail Delivery Agent . After the email reaches the MDA, it is stored on a certain server of Sina, in a certain file or a special database. We call this place for long-term storage of emails as an e-mail.

    If the other party wants to get the email, he must get the email from the MDA to his own computer through the MUA.

 sender -> MUA -> MTA -> MTA -> several MTAs -> MDA < - MUA < - recipient

protocol:

When sending emails, the protocol used by MUA and MTA is SMTP: Simple Mail Transfer Protocol, and the latter MTA to another MTA also uses the SMTP protocol.

When receiving emails, MUA and MDA use two protocols: POP: Post Office Protocol, the current version is 3, commonly known as POP3; IMAP: Internet Message Access Protocol, the current version is 4, the advantage is that it can not only retrieve emails, but also operate directly Mail stored on MDA, such as moved from inbox to trash, etc.

SMTP sending mail


POP3 to receive mail


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326074867&siteId=291194637