However, when Perlshop comes to call Sendmail, the debug output from
Sendmail complains about not having a message body.
Here's the routine that calls Sendmail (I think).
#------------------------------------------------------------------#
sub sendmail
{
my($to, $from, $subject, $body) = @_;
if (lc $mail_via eq 'sendmail')
{
open (MAIL, "|$sendmail_loc -t -oi") || &err_trap("Can't open
$sendmail_loc!\n");
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n";
print MAIL "$body\n";
close MAIL;
}
else
{
if (lc $mail_via eq 'blat')
{
open (MAIL, "|$blat_loc - -t $to -s $subject") || &err_trap("Can't open
$blat_loc!\n");
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n"; print MAIL "$body\n\x1a";
close MAIL;
}
else
{
$err = &sockets_mail($to, $from, $subject, $body);
if ($err < 1)
{print "<br>\nSendmail error # $err<br>\n";}
}
}
}
#------------------------------------------------------------------#
I'm a bit of a newbie at this, and I don't mind doing the RTFM bit, and
indeed I have, but I'm a bit lost at this point, and any pointers would be
gratefully received.
If it helps, here's what the order confirmation page of Perlshop says:
...Shipping and handling charges are not refundable. Error: Must specify
message body or have at least one attachment. BCWare Sendmail/NT v1.1.4
built on Apr 9 1999 at 12:34:32. (c) Nigel R. Ellis 1994 - 1999 Usage:
sendmail [-help] [-to {ToList} | -list {File}] -from From [-cc {CcList}]
[-bcc {BccList}] [-subject Subject] [-F MsgBodyFile] [-A AttachFile [-A
AttachFile ...]] [-h localhostname] [-r smtphost] [-m transport] [-User
MAPIUser] [-Pass MAPIPasswd] [-Trace] sendmail -q DOMAIN Use sendmail -help
for further usage and licensing information. Error: Must specify message
body or have at least one attachment. BCWare Sendmail/NT v1.1.4 built on Apr
9 1999 at 12:34:32. (c) Nigel R. Ellis 1994 - 1999 Usage: sendmail [-help]
[-to {ToList} | -list {File}] -from From [-cc {CcList}] [-bcc {BccList}]
[-subject Subject] [-F MsgBodyFile] [-A AttachFile [-A AttachFile ...]] [-h
localhostname] [-r smtphost] [-m transport] [-User MAPIUser] [-Pass
MAPIPasswd] [-Trace] sendmail -q DOMAIN Use sendmail -help for further usage
and licensing information.
Thanks.
Hi Jonathan,
I think you need to have 2 newlines after the subject to signal the end of
the headers; tagging on an extra \n (e.g., print MAIL "Subject:
$subject\n\n";) should do the trick.
Good luck,
Rick.
You need an extra blank line between the header lines and the body of the
message. As it stands you dont have a body but a big header with errors
in it.
/J\
--
yapc::Europe in assocation with the Institute Of Contemporary Arts
<http://www.yapc.org/Europe/> <http://www.ica.org.uk>