Use SMTP with Telnet

Test local SMTP :
[codesyntax lang="bash" lines="no" container="pre" tab_width="4"]
$ telnet localhost 25
$ helo localhost
$ mail from:xx@abc.com
$ rcpt to:xqpmjh@gmail.com
$ data
$ subject:and i love you too!
$ yes, this is the content end by "."
$ .
$ quit
[/codesyntax]
Test remote SMTP (with auth) :
[codesyntax lang="bash" lines="no" container="pre" tab_width="4"]
$ telnet smtphost 25
$ auth login
$ base64_encode(myusername)   # this means must be base64_encode
$ base64_encode(mypassword)   # this means must be base64_encode
$ helo nickname
$ mail from:myusername   # this means we must use the same user name as login
$ rcpt to:xqpmjh@gmail.com
$ data
$ subject:and i love you too!
$ yes, this is the content end by "."
$ .
$ quit
[/codesyntax]
Posted in Linux| Tagged , |

Comments are closed.