This is the program I use for my guest book..
however please look in the path you have installed send mail
 open(MAIL, "| /usr/lib/sendmail -oi -n -t");

By default it is in "/usr/sbin/sendmail";

Anish

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, November 28, 2004 11:31 AM
Subject: Re: Frowarding mail automatically through script


> sub mail()
> {
> my $from="[EMAIL PROTECTED]";
> my $to=$recipient;
> my $sendmailpath="/usr/sbin/sendmail";
>
>
> open (SENDMAIL, "| $sendmailpath -t");
>
>
> print SENDMAIL "Subject: From Guest Book $subject\n";
>
>
> print SENDMAIL "From: $from\n";
>
>
> print SENDMAIL "To: $to\n\n";
>
>
> print SENDMAIL "$content\n\n";
>
> close (SENDMAIL);
>
>
> }
>
>
> > i had written following script for sending mail automatically through
> > PERL using "sendmail" program in the perl script.
> > But its not workig. What may be the problem with it.
> >
> > #!/usr/local/bin/perl
> > $name = 'name';
> > $email = 'mail id';
> > open(MAIL, "| /usr/lib/sendmail -oi -n -t");
> > print MAIL <<EMAIL_TO_USER;
> > To:$email
> > From:"[EMAIL PROTECTED]
> > Subject: More Information
> > Dear $name:
> > Thank you for contacting us. We will send you the material to this email
> > address. EMAIL_TO_USER
> > close MAIL;
> > print "Content-type:text/html\n\n";
> > print <<HTML_RESPONSE;
> > <html>
> > <title>Thank You Page</title>
> > <h1>Thanks!</h1>
> > Thanks, $name!<br>
> > I'll mail information to $address right away.
> > </html>
> >
> >
> >
> >
> > Yahoo! India Matrimony: Find your life partneronline.
>
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to