Tweets from pichat

PichatFollow my new user account @markseu
About 2 months, 3 weeks ago from Pichat (Pichat Software)

Tweets from 600infos

600infosI HAVE NYANED FOR 888.4 SECONDS! http://t.co/JQYOZebv via @nyannyancat
About 3 months, 3 weeks ago from 600infos (Wolf)

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

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

Translate
Advertisment
  • more about Pichat on http://www.pichat.net
  • C4 - Tiny chat software
  • http://600infos.de
  •    Counter:  11683  Online:  6  Your IP:  38.107.179.238  DNS:  unknown  Page generated in    0.23 sec.