Tweets from pichat
| Follow my new user account @markseu About 2 months, 3 weeks ago from Pichat (Pichat Software) |
Tweets from 600infos
| I HAVE NYANED FOR 888.4 SECONDS! http://t.co/JQYOZebv via @nyannyancat About 3 months, 3 weeks ago from 600infos (Wolf) |
Trace: » Create a random File » registry-switcher.cmd » sendEmail » Set a new IP Address » Simple Webcam Viewer » SMTP Mailing
You are here: Pichat Wiki (en) » Snippets » SMTP Mailing
Table of Contents
SMTP Mailing
| Protocol | SMTP = Simple Mail Transfer Protocol |
|---|---|
| Port: | tcp/25 |
Testing a SMTP-Server
with Telnet
open a telnet session to your Server on Port 25
telnet mySMTPserver 25
Commands
Do you need more Info? Have a look to http://de.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol#Protokoll
helo bar@example.org MAIL FROM:<bar@example.org> RCPT TO:<foo@example.com> DATA From: <bar@example.org> To: <foo@example.com> Subject: Testmail Date: Thu, 26 Oct 2006 13:10:50 +0200 Testmail Client schickt komplette Mail Die Mail muss mit einer Zeile, die nur einen Punkt enthält, abgeschlossen werden . QUIT
with a Command-Script
- to use the testmail.cmd download the sendEmail.exe from http://caspian.dotconf.net/menu/Software/SendEmail/
- extract the sendEmail.exe (from sendEmail-vXXX.zip) in a own directory
- save testmail.cmd and mailserver.txt to the same directory
or you may download and use the testmail.zip (1.39 MiB, 1y ago, 25 downloads)
- create/edit a mailserver.txt with the Mailservers you want to check
- run testmail.cmd
- have a look to the log files (in this directory too)
- mailserver.txt
# IP-Address Hostname 192.168.1.25 mySMTPserver
- testmail.cmd
@ECHO OFF REM send email from command line via SMTP with sendEmail Rem Version 0.1.1 09.04.2010 Mark Wolfgruber rem put your receiver e-mail address here set __TO__=name@domain.org set /p __TO__=test mail to [%__TO__%]: set __DEBUG__=debug.log set __DATE__=%date% %time% set __log__=sendEmail_%COMPUTERNAME%.log set __FROM__=noreply.%USERNAME%@%COMPUTERNAME%.%USERDNSDOMAIN% set __MESSAGE__=Testmail! Please ignore or delete set __MAILSERVER__=mailserver.txt if not exist %__MAILSERVER__% call :add_mailserver if not exist %__MAILSERVER__% goto no_mailserver if exist %__DEBUG__% del %__DEBUG__% echo %date% %time% ### Start sendEmail from %__FROM__% to %__TO__% ### >> %__DEBUG__% echo %date% %time% ### Start sendEmail from %__FROM__% to %__TO__% ### set __ >> %__DEBUG__% set __DATE__=%date% %time% FOR /F "eol=# tokens=1,2,3* delims=, " %%a in (%__MAILSERVER__%) do ( echo %%a %%b >> %__DEBUG__% set __DATE__=%date% %time% set __SERVERIP__=%%a set __SERVERNAME__=%%b call :send ) goto end ::functions :add_mailserver echo. echo.add a Mailserver now... set /p __srvIP__=Mailserver (IP-)Address: set /p __srvName__=Mailserver (DNS-)Name: set /p __srvRemark__=Remark: echo.%__srvIP__% %__srvName__% # %__srvRemark__% >> %__MAILSERVER__% pause goto :EOF :send set __SUBJECT__=this is a test via Server: %__SERVERNAME__% [ %__SERVERIP__% ] (%__DATE__%) echo %__DATE__% *** run sendEmail.exe ( %__SUBJECT__%) >> %__DEBUG__% sendEmail.exe -f %__FROM__% -t %__TO__% -u %__SUBJECT__% -m %__MESSAGE__% -s %__SERVERIP__% >> %__DEBUG__% 2>&1 && goto ok || goto error goto :EOF :ok echo %date% %time% Server OK: %__SERVERNAME__% [ %__SERVERIP__% ] echo %date% %time% Server OK: %__SERVERNAME__% [ %__SERVERIP__% ] tested from %COMPUTERNAME%.%USERDNSDOMAIN% >> %__log__% goto :EOF :error echo %date% %time% Server ERROR: %__SERVERNAME__% [ %__SERVERIP__% ] echo %date% %time% Server ERROR: %__SERVERNAME__% [ %__SERVERIP__% ] tested from %COMPUTERNAME%.%USERDNSDOMAIN% >> %__log__% goto :EOF ::jumppoints :no_mailserver echo.ERROR echo.%__MAILSERVER__% not found echo.please create %__MAILSERVER__% like a hosts-file first echo. pause goto end :end rem echo Logfile: %__log__% rem echo Debugfile: %__DEBUG__% echo %date% %time% ### End sendEmail ### >> %__DEBUG__% echo %date% %time% ### Start sendEmail ### pause