All About Email
What is E-Mail. The e-mail that presents itself so uniformly under the roof of a mail client such as Thunderbird, Gmail or Apple Mail actually requires cooperation with at least two different servers. One is responsible for sending e-mails and for this purpose runs the SMTP protocol (Simple Mail Transfer Protocol). Another server contains the mailbox where messages addressed to you arrive, and this service is provided either by the widely used POP3 protocol (Post Office Protocol Version 3) or the more convenient IMAP (Internet Message Access Protocol). When you want to send an e-mail, it is sent to an SMTP server, which takes care of forwarding the message to the recipient. SMTP, defined in RFC 2821, is similar to FTP a simple text-based protocol consisting of a few commands. The responsible server waits for connections on TCP port 25.
Some SMTP servers of Internet providers do not control the identity of the sender until
today. The problem is that such servers can easily be used for sending spam or even
someone can fake a false identity. However, the SMTP specification does provide several
possible authentication methods:
Some SMTP servers check the IP address of the host from which the connection was
initiated - an ideal method for normal ISPs who only want to give access to their SMTP
servers to their own customers
Another possibility is to require the user to log on to the e-mail receiving server of the
same provider as a prerequisite for sending e-mails. This procedure is called SMTP after
Disadvantage : Some email clients cannot handle it, so you have to click on RECEIVE
EMAIL each time before sending an email.
The most secure method was added to SMTP afterwards: personal login to the SMTP
server with username and password
Another trick for you from me is if you buy SMTPs from someone, ask for a mailtest before
you buy many SMTPs, use Telnet on Linux or Windows and test the login, EHLO and
sending a mail first before you buy anything.
SMTPs that do not accept email as a format are "dead" and the person you wanna buy is
either trying to rip you or just has a dead smtp.
RCPT To: email@example.com
454 4.7.1 <firstname.lastname@example.org>: Relay access denied
Sending A E-Mail
You can communicate with an SMTP server using the Telnet program. For example, such
a session looks like this(Everything in the square brackets is uniform, e.g. date, IP):
telnet smtp.provider.com smtp
220 smtp.provider.com ESMTP [date]
250 smtp.provider.com Hello[ip]
MAIL From: email@example.com
250 <firstname.lastname@example.org> is syntactically correct
RCPT To: email@example.com
250 <firstname.lastname@example.org> verified
354 Enter message, ending with "." on a line by itself
This is a sample message for viperzcrew learning
250 OK id=[id]
221 smtp.provider.de closing connection.
Who has seen it correctly, all numbers like 220,250 are answer from the server so do not type. The following SMTP commands are used in this short conversation: HELO: With this command the client logs on to the server, possibly the already described check of the client IP address takes place in this context. Some SMTP servers also require the specification of a domain name behind the command. MAIL: This command initiates the creation of a new message, the sender must be specified in the format: From: MAILADDRESS or From: Name
MIME & MIME Format Types
An alternative format for e-mails, which is already more commonly used today than RFC
822, is the MIME format. The different aspects of MIME are described in RFC 2045 to
2049. The abbreviation MIME stands for Multipurpose Internet Mail Extensions. It is a
format suitable for sending any text and binary data, even different types of data within the
The MIME header is an extension of the RFC-822 header. The main new fields are
Content-Type, which specifies the data type, and Content-Transfer-Encoding, which
defines the data format.So the first one describes the content of the message, the last one
the form in which it is sent.
The content type (Content-Type), usually called MIME-Type, consists of two parts
separated by a slash (/): the main type and the more precise subtype. Main types are for
example text(ASCII text), image(image data), audio(audio data), video(digital video) or
application(proprietary data format of a certain application program).
Here are some MIME types:
text/plain Pure text without formatting commands
text/html HTML code
text/xml XML code
image/gif Image of file type GIF
image/jpeg Image of file type JPEG
image/png Image of file type PNG
audio/wav sound file of type Microsoft WAV
audio/aiff sound file of type APPLE AIFF
audio/mpeg Compressed sound file of type MP3
video/avi Digital video of type Microsoft Video for Windows
video/mov Apple QuickTime digital video
video/mpeg Digital video of type MPEG
application/x-shockwaveflash Compressed Adobe Flash movie (extension .swf)
application/x-director Compressed Adobe Director movie (extension .dcr)
multipart/mixed Cover for several MIME subsections
multipart/alternative Cover for the same content in several alternative formats
multipart/form-data Envelope for POST form data including file uploads
More About MIME Types
The last three types in the table from last time make MIME especially interesting: A MIME
document of type multipart/mixed can contain any number of parts, each of which has a
complete MIME header and can again have any MIME type.
This technique is used in modern e-mail programs to add file attachments to the mail. In
contrast, a multipart/alternative type section is used to enclose the same content in various
alternative formats, such as an image in GIF and PNG format, or the body of an e-mail
message in plain text and HTML format.
The same procedure is used for web forms, if they support file uploads in addition to
normal selection or input fields.
The Content-Transfer-Encoding header gives the recipient client an indication of how to
interpret the incoming data. Commonly used values are approximately the following:
7bit: No encoding: suitable for 7-bit ASCII (English text). Automatic line break after
8bit: No encoding: suitable for 8-bit text (international text). Also automatic line break
after 1000 characters.
binary: No encoding, no automatic line break
quoted-printable: Special encoding of special characters beyond 7-bit ASCII. Example:
»larger« to »gr-FC=DFer«.
base64: Preferred encoding for binary data. A special algorithm repackages the data 7-
bit compact. This format is not readable by humans, even if plain text is encoded (e.g.
"Hello World" becomes "SGFsbG8gV2VsdCEK")
The coding forms quoted-printable and base64 have the advantage that the mail message
remains formally compatible with RFC 822 and can therefore be sent and received via old
E-mail reception via a POP3 server is text-based, similar to SMTP. The server
communicates via the TCP port 110. The description of POP3 is in RFC 1939. For
clarification here again a Telnet based command list
telnet pop.myprovider.de pop3
The following POP3 commands are used in the list:
USER: Specify the user name for the login
PASS: Specify the password for the login
LIST: numbered list of available e-mails with the respective length in bytes
RETR: Receive e-mail with the specified number
DELE: Delete e-mail with the specified number from the server
QUIT: End session
By default, most e-mail programs perform RETR and DELE immediately after each other,
so the messages usually do not remain on the server. With IMAP servers, however, things
are usually different: The special advantage of the IMAP protocol is that different folders
can be set up on the mail server itself to manage mails there.
In this way, IMAP facilitates e-mail management for mobile users. An IMAP server works
similar to a POP3 server, but uses TCP port 142.
Another popular way of using e-mail is web-based freemail services such as GMX or
Hotmail. These are common POP-SMTP combinations made accessible through a website
with personal login. The program that communicates with the e-mail servers runs on the
web server and is made available to the customer via browser.
What's Your Reaction?