I am trying to send an email, ( which works), with an attachement (which was
a blank file, but is now nothing). I have previous versions of this code,
but this is the latest below. I was trying to use the Mail::Sender mod, but
it gave me the blank file. Does anyone have any assistance or links to a
good tutorial on this??
thanks!
########## CODE SNIPPET BELOW
my $mailBody .=<<"EOF";
------=_NextPart_000_01BC7D88.04547780
Content-Type: application/octet-stream; name=\"$datestamp-payables.csv\"
Content-Transfer-Encoding: quoted-printable
Content-Description: sh_conf (CSV File)
Content-Disposition: attachment; filename=\"$datestamp-payables.csv\"
EOF
open (FIN, "$datestamp-payables.csv");
while (<FIN>)
{
my $mailBody .=$_
};
close FIN;
$mailBody .=<<"EOF";
------=_NextPart_000_01BC7D88.04547780--
EOF
open (MAIL, "|/usr/sbin/sendmail -t -oi") || die "Can't fork for
sendmail:$!\n";
print MAIL <<EOF;
From: <$final_recipient>
To: <scott.lutz\@hotmail.com>
Subject: Daily Order Conversion script
X-MSMail-Priority: Normal
X-Priority: 1
X-Mailer: scott lutz\'s massive mailer
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_01BC7D88.04547780"
Content-Transfer-Encoding: 7bit
This is a multi-part message in MIME format.
------=_NextPart_000_01BC7D88.04547780
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Orders to comma-separated-value file
$mailbody
EOF
close(MAIL) || warn "sendmail didn't close nicely\n";
print "Mail message sent\n";
######### END CODE
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]