Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Perlshop having probs with sendmail in Win98

0 views
Skip to first unread message

Jonathan Horniblow

unread,
Aug 14, 2000, 3:00:00 AM8/14/00
to
I download Apache. Then ActivePerl. Then Perlshop.
Perlshops inbuilt sockets mailer wasn't having any of it (sendmail error -3)
so I downloaded a Win32 version of sendmail from
http://www.winsite.com/info/pc/winnt/netutil/sendmail.zip/
Got it all running and configured nicely by the end of the day.
Sendmail works fine on it's own.

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.

Ricky J. Sethi

unread,
Aug 14, 2000, 3:00:00 AM8/14/00
to

Jonathan Horniblow <jhorn...@ntlworld.com> wrote in message
news:yoWl5.5067$pR4....@news6-win.server.ntlworld.com...
[SNIP]

> print MAIL "To: $to\n";
> print MAIL "From: $from\n";
> print MAIL "Subject: $subject\n";
> print MAIL "$body\n";
> close MAIL;
[SNIP]

> ...Shipping and handling charges are not refundable. Error: Must specify
> message body or have at least one attachment. BCWare Sendmail/NT v1.1.4

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.

Jonathan Stowe

unread,
Aug 15, 2000, 3:00:00 AM8/15/00
to
In comp.lang.perl.misc Jonathan Horniblow <jhorn...@ntlworld.com> wrote:
> I download Apache. Then ActivePerl. Then Perlshop.
> Perlshops inbuilt sockets mailer wasn't having any of it (sendmail error -3)
> so I downloaded a Win32 version of sendmail from
> http://www.winsite.com/info/pc/winnt/netutil/sendmail.zip/
> Got it all running and configured nicely by the end of the day.
> Sendmail works fine on it's own.
>
> However, when Perlshop comes to call Sendmail, the debug output from
> Sendmail complains about not having a message body.
>

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>

0 new messages