What is SMTP?


SMTP is short for Simple Mail Transfer Protocol. It is the de-facto standard protocol for sending e-mail from a client computer to an e-mail server. In addition, SMTP is used to relay e-mail from the sender's e-mail server to the destination e-mail server, where the receiver of the e-mail can retrieve it (through POP3 or IMAP4).

Since SMTP can only be used to send e-mail, e-mail clients typically use POP3 or IMAP4 to receive e-mail from an e-mail server.

Overview

SMTP is used to move e-mail from an e-mail client, through relaying mail servers, to the receiver's e-mail server, where the receiver can pick it up at their leisure.

Typically, an e-mail client will connect to an SMTP server and send any mail in the outbox. That SMTP server will then look up the mail servers responsible for each e-mail address that is supposed to receive each message. The server will then contact the destination servers, one at a time, and relay the message using SMTP. The destination server will either pass the message along to another local e-mail server that is assigned to store messages for the person receiving the mail, or store that message itself.

Many SMTP servers restrict who can send messages through them. For example, most internet service providers will only allow their customers to send messages, and only while connected to the ISP's cable or DSL modems. Other SMTP servers require a username and password before you can send mail through them. This helps reduce the amount of spam being sent, although it does not prevent it.

Using SMTP in Scripts

SMTP is often used in scripts on websites to enable users to send messages using a set of forms. In this case, the scripts use a small SMTP client on the web servers to send mail through your e-mail account. In this case, the scripts need to be configured with the right information to send the mail. See our PHP and third party programs categories for more information on specific scripts, and our e-mail server information article for general settings.

Related Links