SMTP

=SMTP= Author: SeHong Park

SMTP stands for Simple Mail Transfer Protocol. SMTP was first defined in RFC821 and last updated by RFC5321. It is a protocol for sending e-mail through the Internet. It uses TCP port 25. SMTP is text based on protocol and defined that all the characters should be a 7bit ASCII. Therefore, languages or attached files that use over than 8 bit code are changed in to 7 bit by MIME. SMTP is not very reliable, but as it's based on TCP, SMTP has high efficiency.

SMTP is not only used for transmit and receive messages, but also used for sending e-mails to e-mail server in e-mail client. POP (Post Office Protocol) or IMAP (Internet Message Access Protocol) are for receiving messages. The process of sending e-mail is; e-mail client - SMTP(transmitting) - SMTP(receiving) - server. If there is a POP between SMTP(receiving) and the server, the receiver can receive e-mail through e-mail client which applicate POP.

After the client and the server are connected SMTP sessions works like; (The messages from the client has "C:" in front of them and the messages from the server has "S:" in front of them) S: 220 www.example.com ESMTP Postfix C: HELO mydomain.com S: 250 Hello mydomain.com C: MAIL FROM:  S: 250 Ok C: RCPT TO:  S: 250 Ok C: DATA S: 354 End data with . C: Subject: test message C: From: sender@mydomain.com C: To: friend@example.com C: C: Hello, C: This is a test. C: Goodbye. C:. S: 250 Ok: queued as 12345 C: quit S: 221 Bye

Image:

Reference: