Tag Archives: smtp plan

SMTP SERVER: BUILD THAT EMAIL CLIENT

When you need to set an email client, one of the first questions is: What is a SMTP server?

“Simple Mail Transfer Protocol (SMTP) is an Internet standard for electronic mail (email) transmission. Although electronic mail servers and other mail transfer agents use SMTP to send and receive mail messages, user-level client mail applications typically use SMTP only for sending messages to a mail server for relaying. For retrieving messages, client applications usually use either IMAP or POP3. SMTP communication between mail servers uses TCP port 25. Mail clients on the other hand, often submit the outgoing emails to a mail server on port 587. Despite being deprecated, mail providers sometimes still permit the use of nonstandard port 465 for this purpose. SMTP connections secured by SSL, known as SMTPS, can be made using STARTTLS”

Simply put, an SMTP server is a machine, or collection of machines, whose primary purpose is to send, receive, and/or relay messages between email senders and receivers. An SMTP server will have an address, or addresses, that can be set by the mail client or application that you are using, generally formatted as smtp.serveraddress.com.

What does the SMTP server do when I send email?

#1You send an email with your webmail or mail client from your address (e.g. lass@website.com) to a given recipient (e.g. bass@domain.com). In jargon, the webmail or client is called Message User Agent, or MUA.

#2 The message is sent normally via port 25 to an SMTP server (named for instance mail.website.com) which is given to your client when you set it up and acts as a Message Transfer Agent or MTA. Client and server start a brief “conversation” where the latter checks all the data concerning the message’s transmission (sender, recipient, domains, etc.). Note that SMTP language defines only the message’s transmission, and doesn’t deal with its body content.

#3 Then, if the domain where your recipient has his account is directly connected to the server, the email is immediately delivered. If it’s not the case, the SMTP hands it to another incoming server closer to the recipient (in jargon these passages are called relays). In our example, the Website server connects with the Domain server, which (if everything has gone right) receives the email and stores it.

#4 What if the recipient’s server is down or busy? The SMTP host simply drops the message to a backup server: if none of them is available, the email is queued and the delivery is retried periodically. After a determined period, however, the message is returned as undelivered.

#5If there are no issues, however, the final segment is controlled by POP, another protocol that picks up the email from the receiving server and puts it into the recipient’s inbox.

Now that you know how a SMTP works, GET EMAILING!!