Home > Article > Backend Development > Sending email using Socket 3_PHP tutorial
The following is a simple command header (this is done after opening the socket), which is the test result of sending an email to stmp.263.net:
HELO limodou
250 smtp.263.net
MAIL FROM: chatme@263.net
250 Ok
RCPT TO: chatme@263.net
250 Ok
DATA
354 End data with .
To: chatme@263. net
From: chatme@263.net
Subject: test
From: chatme@263.net
test
.
QUIT
250 Ok: queued as C46411C5097E0
This is some simple knowledge about SMTP. Related content can be found in RFC.
RFC 821 defines related commands for receiving/sending emails.
RFC 822 specifies email? content format.
RFC 2045-2048 specifies multimedia email?
RFC 1113, 1422-1424 discusses how to improve the confidentiality of email.