About the Problem - http://www.cauce.org/about/problem.shtml
Fight Spam on the Internet! - http://spam.abuse.net/
Links about UCE, UBE, Spam - http://www.sendmail.org/~ca/email/spam.html
Why HTML in E-Mail is a Bad Idea - http://www.betips.net/etc/evilmail.html
Friends Don't E-Mail Friends HTML - http://www.wired.com/news/business/0,1367,41639,00.html
Blat is a small, efficent SMTP command line mailer for Windows. It is the SMTP *sending* part of an eMail User Agent (MUA) or eMail client. As such, Blat sends eMail via SMTP (or internet eMail) from the command line, or CGI, ...
Blat is NOT a drop in replacement for the Unix SENDMAIL, MAIL, MAILX utilities (or for that matter, any other eMail tool you can think of). A Perl script written to use these, for example, will not work without some tweaking.
Directory of D:\Tools\eMail\blat194 01/21/2002 01:57p 36,864 blat.exe
Yes, check out http://groups.yahoo.com/group/blat/
Or send eMail to
The only dumb question is the one not asked! Please go to the Blat list at Yahoo and ask!
Check in the Command Line items for more information.
Most MS Exchange systems likely have an SMTP service, you should check with your eMail administrator to find out what it is.
You do not want the \\domain\machine syntax here, but rather a DNS syntax (smtp.MyDomain.com or whatever) or TCP/IP Address. You should be able to ping to that name or address.
You can verify the SMTP service is working with the telnet command.
From a command prompt run:
telnet SMTP.Server.or.IP.Address.com 25
The server should respond with a 220 message if it is working correctly (type QUIT to end, you should get a 221 message).
,----- [ UC = You type, LC= SMTP Service response ] | C:\>TELNET SMTP.MYDOMAIN.COM 25 | 220 mydomain.com ESMTP | QUIT | 221 mydomain.com | | Connection to host lost. `-----
Toby Korn has created a DLL version of blat. It is available from his page at http://www.geocities.com/toby_korn/blat/.
Try running Blat with the addition of the -debug -log blat.log switches.
There are a bunch in the Readme.txt file that came with the Blat you downloaded from http://www.blat.net.
Blat takes command line paramaters (and pulls some options from the Registry) to send SMTP eMail.
For more information, check the source code which is included with the distribution.
Yes, the homepage says it is a Public Domain tool. Check the Public Domain licensing for exact rules & restrictions.
Check http://www.blat.net
It is in the windows registry.
HKEY_LOCAL_MACHINE \ SOFTWARE \ Public Domain \ Blat
Because it simplifies the command line by storing any or all of the following in the regestry [HKEY_LOCAL_MACHINE \ SOFTWARE \ Public Domain \ Blat].
SMTP Server Address Sender's Address Number of times to retry sending Port number to use (ie, if not the SMTP default of 25) The -q switch which "supresses *all* output"
Blat -install smtphost.bar.com [email protected] // Sets host and userid
Blat -install smtphost.bar.com foo // Sets host and userid
Blat -install smtphost.bar.com // Sets host only
Here is one way. If you have another, please send it on to me, I may include it.
,----- [ insert in your Kix32 script ] | IF EXIST (@LDRIVE + "LogonMessage.bat") | SHELL @LDRIVE + "LogonMessage.bat" | ENDIF `----- ,----- [ LogonMessage.bat ] | @set message=Error \"logging in\" at %time% on %date% | @blat - -to [email protected] -server smtp.mail.svr -f [email protected] | -subject "%message%" -body "%message%" -q `-----
Use a batch file and set an environment variable for the subject, using the backslash char to escape the `` char.
,----- [ blat.bat ] | set note=Check out the \"quoted\" text! | blat - -to [email protected] -server smtp.mail.svr -f [email protected] | -subject "%note%" -body "%note%" -debug -log blat.log `-----
Use <> as the paramater for the -f switch.
-f <>
SMTP eMail syntax is defined in RFC(2)822. You can look here if you really want to read it <g>.
Common Gateway Interface
There are 2 basic ways I can think of.
1. Call Blat as your CGI application. You don't have much control over the format of the message in this method.
2. Use another CGI application (like Perl for example) to gather your CGI input and format the message. (btw, Perl can send eMail nativly...)
Yes, one comes in the distribution of Blat, look for demoblat.htm.
Here is one tim cobbled together after playing with the one in the distro.(Note, this looks like it may work if you try it, but as of right now, this FAQ is hosted on a unix platform, so Blat will not run.)
Sure, you can find them on the web.
Here is one tim cobbled together after looking at various ones on the web (but not really liking them...).
Blat is not a Win32 version of sendmail, and as such, you can not just change the sendmail calls in your Perl code to call Blat.exe
Sendmail is an eMail Transfer Agent (MTA).Blat is the SMTP *sending* part of an eMail User Agent (MUA) or eMail client
Check out the ``What is Blat'' part of this FAQ.
One of the first things you want to do if you are having problems is use the -debug switch (you can also use the ``-log logfile.log'' switch to put the output in a file.)
<<<getline<<< 550 5.7.1 Unable to relay for [email protected]
A server will think it is 'relaying' when neither the sender or recipient address are an address that belongs to it. This is discussed more in RFC2821 (search for 'relay').
I tend to run Blat where it is not an option to use the '-install' feature, so define lots of paramaters.
I am not sure why one would want to use Perl to call Blat. Perl can send eMail nativly, so doesn't need Blat, and Blat has no need to be called by Perl.
However, I see the quest fairly often, so...
<Start Perl wrapper code>
#!perl -w use strict;
# declare the variables we are going to use my ($to, $f, $subject, $body, $server, $hostname, $u, $pw, $debug, $x, $return);
# you must change the values marked with <-- **** # populate all the variables we are going to use $to = "-to eMail\@MyDomain.com"; # <-- **** $f = "-f eMail\@MyDomain.com"; # <-- **** $subject = "-subject \"Testing blat\""; $body = "-body \"Testing blat\""; $server = "-server smtp.MyDomain.com"; # <-- **** $hostname = "-hostname MyHost"; $u = "-u UserID"; # <-- **** $pw = "-pw PW!"; # <-- **** $debug = "-debug"; $x = "-x \"X-Custom-header: Check it out!\"";
# Here is where we run Blat. # Note, the Perl vars are the same as Blat's paramaters. # All the stuff you see Blat return to STDOUT (non error messages to # the screen) get put in the $return variable. $return = `blat - $to $f $subject $body $server $hostname $u $pw $debug $x`;
print $return;
</End Perl wrapper code>
:: Populate all the variables we are going to use
:: You must change the next 3 values set to = "-to eMail\@MyDomain.com" set f = "-f eMail\@MyDomain.com" set server = "-server smtp.MyDomain.com"
set subject = "-subject \"Testing blat\"" set body = "-body \"Testing blat\"" set debug = "-debug"
:: Here is where we run Blat. :: Note, I named the vars the same as Blat's paramaters. blat - %to% %f% %subject% %body% %server% %debug%
``NO real reason for calling it blat... actually I wanted to call it Blat mainly because Pedro thought it was a ridiculous name. And then because we could say things like 'I'm just going to blat off a quick email to ...' etc...''
--Mark Neal