SMTP Commands: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
Once a session has been established you can proceed with the following commands.
Once a session has been established you can proceed with the following commands.
<pre>
<pre>
helo
helo mydomain.com
mail from: <from address>
mail from: <from address>
rcpt to: <to address>
rcpt to: <to address>
Line 17: Line 17:




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

Latest revision as of 01:34, 6 July 2016

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