[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Can't get sendmail to put subject right...



On Tue, Jul 25, 2000 at 08:59:45PM +0200, Thomas De Groote wrote:
> Help me please,
> 
> I have to finish this project before tomorrow, and I ran into a
> problem...
> 
> I am using sendmail directly from within a script, and my mails come
> through, but without subject. That is, the subject comes inside the
> mail, and not in the headers. Can anyone explain me what to do ? Here is
> the chunk of code (this is not a complete program !)...
> 
> 
> $mailprogram = '/usr/lib/sendmail';
> 
>          open(MAIL,"|$mailprogram -t");  #  || &error("Kon mail
> programma niet openen.")
>          print MAIL "From: $FORM{'reply'}\n";
>          print MAIL "To: $dest[0]\n";
                           ^^^^^^^^

I suspect that this value already ends with a newline, so you are printing
two newlines here.  chomp() the value before you print it.

>          print MAIL "Subject: $subject\n\n";
>          print MAIL "$mailbody\n\n";
>          close MAIL;
> 


Ronald

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org