Simple Mail Transfer Protocol
The TCP/IP model (RFC 1122) |
---|
Application Layer |
Transport Layer |
Internet Layer |
Link Layer |
Simple Mail Transfer Protocol (SMTP) is an Internet communication protocol used to send and relay an email message between email servers. It is not used to retrieve email messages from a server. Instead either IMAP or POP is used to retrieve email messages.
The SMTP protocol needs to be made available by an application, this application that responds to the SMTP requests for those who wish to send Email or relay EMail is called a SMTP Serve/SMTP Relay. You can break it into two types as given below, both are mostly the same other than the a minor difference –
- SMTP Server : It is the same thing as a SMTP relay but mainly used when the receiver domain is the same as the server domain. These are usually used with free email services like gmail.com , yahoo.com.
- SMTP Relay Server : This is also a Server, but this term is used when the source email and destination email domains are different from the SMTP server domains. An example can be SendGrid or SendInBlue who offer these.These servers are mainly routers for the mail.
How SMTP Works ?
Below is a common guide to how the process of Sending Emails work with the SMTP.
- A user wanting to send an email from say source user to recipient user mail uses his Email client to draft an Email with Subject and Body and press Send.
- Once the user presses send the Email client will connect to the configured SMTP server for now let’s assume it to be smtp.source.com . The client and SMTP server do a handshake and if authorization is required then the client will provide credentials for the same.
- After handshake the Email Client sends the Receivers address which in our case is recipient mail , subject and the body.
- If it had been our user had been sending to a someone in the same domain then our server will simply forward it internally to the local recipient server.
- Next the SMTP server using a DNS request for MX records finds out the recipients IP or domain address where his SMTP server is running.
- Next it connects to the receivers SMTP address and tried to deliver the email.
- The recipients Email Server verifies if it can handle the Email being forwarded to it. And if all is well then it forwards this to the incoming IMAP or POP3 Server.
(Simple Mail Transfer Protocol) SMTP is an international electronic standard for transmission of emails. Nearly all emails use a free SMTP server. If you get an email in your inbox, most likely it is sent from an SMTP server.
Related pages
- Internet Message Access Protocol (IMAP)
- Post Office Protocol (POP)