19 Nov
blat.exe -f from@email.com -to recipient@email.com -subject ThisIsTheSubject -body ThisIsTheBody -server smtp.server.com:25 -u SMTPUserLogin -pw SMTPUserPass
Using the command line above, I will receive an email notification alert whenever the server goes down. If I want to receive it in a form of SMS on my mobile, I will need subscribe “email to SMS” service from Clickatell, World-Text or any other provider that offers such service.
There hasn’t been any updates on Blat for more than 2 years but I can verify that it works without any problems on my webhosting SMTP server. However I don’t think you can use Gmail, Hotmail, and Yahoo SMTP to send out email because this 3 email service requires SSL and I can’t find this option in Blat. You can try SendEmail which supports TLS but you will first need to install the Net::SSLeay and IO::Socket::SSL perl modules on Windows.
[ Visit Blat Official Homepage ]
: Copying this article to your website is strictly NOT allowed. However, if you like this article, you can use the HTML code below to directly link to this article.
12 Hours of Downtime Today But NO MORE in Future 24 hours website downtime Today Only: FREE Command & Conquer Red Alert PC Game for Everyone! Get Notified When Unauthorized User Checks Your Webmails MessengerDiscovery Live – MSN Messenger Addon Find Out the Command Line Location When Windows Opens a Window Find Out What Program are Running at Windows System Tray
Have computer technical problems? Get FREE help from Raymond.CC FORUM
5 Responses for "Sending Email Using Command Line Useful for Downtime Alert Notification"
nice info raymond..:-)..tq
great.. i can use this for my visual basic project. thanks.
nice info,…thanks Ray
pls provide me the bit defender key
@ raymond
You can use blat with gmail, but this is more advance.
You need to use stunnel locally to do the secure link.
Here is my batch file example
*================================
@echo off
setlocal enableextensions enabledelayedexpansion
:: Startup directory where the command is
cd /d %~dp0
:: Configure Email Options
SET emailfrom=xxx@gmail.com
SET emailto=xxx@gmail.com
SET password=yyyyy
SET SMTPserver=127.0.0.1:465
stunnel\stunnel.exe -install -quiet
net start stunnel >nul
::sendfiles
blat\blat.exe test-email.txt -q -s “testing 1 2 3″ -base64 -to %emailto% -f %emailfrom% -u %emailfrom% -pw %password% -server %SMTPserver%
:cleanup
:: Stop stunnel
net stop stunnel >nul
stunnel\stunnel.exe -uninstall -quiet
:: Delete vars
SET emailfrom=
SET emailto=
SET password=
SET SMTPserver=
rem exit
Leave a reply