# This is a learning note for the Liaoche teacher Python tutorial
Email history is longer than the web, and until now, email is a very wide range of services on the Internet. And almost all programming languages support sending and receiving e-mails.
1 , the principle of mail
1.1 , the sending process of mail
Suppose we're going to send the mail from [email protected] sent to @sina. com
MUA : Outlook or Foxmail This type of writing / Send / Mail software, known as mua "Mail user agent--Mail users agent"
MTA : Email service providers, such as NetEase, Sina, etc. MTA "Mail Transfer agent--Mail transfer agent"
MDA : The place where the message is stored for a long time MDA "Mail Delivery agent--message delivery Agent". MDA waits for MUA to take the message to their computer
So, the journey of an email is:
MUA, MTA, MTA-I----, MTA---<- MUA <-Recipients
1.2 , writing the nature of the mail program
Write MUA to send mail to MTA;
Write MUA to receive messages from the MDA.
1.3 , the protocol used by the Mail transfer
MUA and the MTA , MTA and the MTA between the use of SMTP protocol "simple Mail Transfer Protocol"
There are two types of protocols used by MUA and MDA
Pop:post Office Protocol, the current version is 3, commonly known as POP3
Imap:internet message Access Protocol, currently 4, has the advantage of not only receiving mail, but also directly manipulating messages stored on the MDA, such as moving from the inbox to the trash, etc.
2 , expand Documents
Basic Message principle (MUA,MTA,MDA) (72871485)
Python Learning Note __17 Email