you are often sending out more than just your message.
Many people see a lot of extra formatting stuff and other
junk that has nothing to do with your message.
It's annoying, uses extra bandwidth and not appropriate for eMail or news.
Certainly, sending out your messages as HTML without even a plain-text
alternative is just plain rude.
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.
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>
# 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`;
``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...''