SMTP Commands

From KlavoWiki
Jump to navigationJump to search

If you would like to create an email directly from an SMTP server you can use the commands as follows. The method below is mainly used for testing the relaying restrictions of the SMTP server in question. You need to do the commands in the order as specified. The only exception is the subject line.

You need to first establish a session with the SMTP server. Typically this is done with telnet.

telnet <server address> 25

Once a session has been established you can proceed with the following commands.

helo mydomain.com
mail from: <from address>
rcpt to: <to address>
data
subject: <subject>
<message goes here>


To end the message, depending on the SMTP server and to send the email enter the below sequence without any spaces.

.

or

enter . enter