# Python core programming network protocol programming Email
Email system components:MTA message transmission proxy, responsible for mail routing, queue and sending
SMTP Simple Mail Transfer Protocol1. Connect to the server2 Login3. Send a service request4. Exit
POP: Post Office ProtocolRFC918 "Post Office Protocol aim
cheat and lie, but generally the server can detect it.The address specified in the mail from command is the sender address.Rcpt to identifies a single email recipient; multiple rcpt to can be used; it is often behind the MAIL command.After one or more RCPT commands, data indicates that all Email recipients have been identified, and data transmission is initializ
settings:
Receiving mail (POP3) server-requires SSL: pop.gmail.com
Use SSL: Yes
Port 995
Send mail (SMTP) server-TLS or SSL: smtp.gmail.com (use authentication)
Use authentication: Yes
TLS/STARTTLS Port: 587
SSL port 465
Account
, program B can also change from receiving SMTP to sending SMTP. If you want to refuse to change the role, the recipient can send a 502 message as a response. Note: this command is optional. This command is generally not used when a TCP transmission channel is used. However, this command is useful when the cost of establishing a transmission channel is relatively
The following is a PHP example program that I found directly using SMTP to send mail (adapted), but the server always prompts: the system busy! And the message could not be sent.
Who knows how to handle it?
Another: How do you handle validation when the SMTP
Handlesendemail.aspx logicprotected void Page_Load (Object Sender,eventargs e){foreach (var item in Request.Form.Keys){if (item. ToString (). Startswidth ("Txtmail")){String Mail=request.form[item. ToString ()];Setting up SMTP servers and portsSmtpClient smtpclient=new smtpclient ("[Email protected]", 25);Set the user name and password to log on to the SMTP servi
to the receiving end path. The Mail Exchange server of the Domain Name Service system (DNS) can be used to identify the next hop IP address that transmits messages.
Protocol structure
The SMTP command is the ASCII information sent between the SMTP hosts, which may be as follows:
Command
Describe
ways to send mail using external mailboxes
Bin/mail will use the local sendmail to send mail by default, which requires local machines to install and start the SendMail service, is cumbersome to configure, and can cause unnecessaryResource occupancy. By modifyin
failed # login failure due to direct user name and passwordAUTH LOGIN334 dxnlcm5hbwu6Y3jhenl3awxs334 ugfzc3dvcmq6Bxlwyxnzd29yza =235 authentication successful # log on successfully using base64 encodingMail from: 553 you are not authorized to send mail, authentication is required # mail cannot be forgedMail from: 250 mail
= "reterry123@163.com"; user mailbox for//SMTP server
$smtpemailto = "dxytools@gmail.com";//Send To whom
$smtpuser = "reterry123"; user account for//SMTP server
$smtppass = "014040001"; user password for//SMTP
The SMTP (Simple Mail Transfer Protocol) is simply a mail Transfer protocol, a set of rules for sending messages from the source address to the destination to control how the letters are transferred.Python's Smtplib provides a convenient way to send e-mail. It is a simple en
Sending mail via socket means sending the above commands to the mail server through the client, so as to realize the SMTP protocol to send mail. PHP uses the socket method to send the
The reason must be in the WordPress PHP Mail send class. Easy Google to reason: the original Windows SMTP service does not support the name of the message format, must be written directly to address@domain.com. So the WordPress class-phpmailer.php in this line
Copy the Code code as follows:
$from [0][1] = $this->fromname;
Comment out on the OK.
The above desc
For smtp mail, who can help check the 503 Error: needEHLOandAUTHfirstResolvingSMTPserverdomain quot; smtp.qq.com quot ;... connectingtohostaddress quot; 119.147.74.45 quot; port25... connecte, who can help with smtp mail? 503 Error: need EHLO and AUTH first
Resolving SMTP
Recently, using the Mail Service on a project, the mail service that comes with it can send messages, but after testing, the addresses that are sent are not regular messages. Originally wanted to lazy use of sendmail, but the old was blocked, so had to use third-party authorization to send
";
$mail->addattachment ("C:/temp/11-10-00.zip", "New_name.zip"); Optional name
if (! $mail->send ())
{
echo "There was a error sending the message";
Exit
}
echo "message is sent successfully";
4. Using the PEAR::NET_SMTP component
Pear is really a good thing, probably very many people do not how to use, at least I currently use hi
Bxlwyxnzd29yza = 235 authentication successful # log on successfully using base64 encoding Mail from: Test@163.com > # Sender 553 you are not authorized to send mail, authentication is required # mail cannot be forged Mail from: Crazywill@163.com > # Sender250
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.