Send an email using Telnet

Here are simple steps on how to send an email using telnet. This a great way to test your mail server configuration such as  sendmail or postfix without a need for a email client. First telnet to yor mail server:
$ telnet mail.mymailserver.com 25
Use HELO command to tell mail server from which domain you are coming from:
HELO UL_Daily_Dose.in
Now we need to state from which address this email will be sent. This is done with MAIL FROM: command:
MAIL FROM: AJM@UL_Daily_Dose.in
Next step is to specify recipient with RCPT TO:
RCPT TO: XYZ@remote_box.com
Now we ca star writing some subject and body. To do that we need to use DATA command. First type DATA followed by Subject: and body. Once done enter . to send email to be queued.
DATA
Subject: Sending an email using telnet

Hello,

Here is my body? Do you like it?

cheers
.
Do not forget "." at the end of the message. To quit type
quit

Comments

Popular posts from this blog

HP-UX virtual Machine Cheat Sheet

How to run fdisk in non-interactive mode