Hello Craig,
Wednesday, August 22, 2001, Craig S Monroe <[EMAIL PROTECTED]> wrote:
CSM> The script completes, but the mail is never sent.
CSM> I do not receive any errors..
CSM> #! /usr/bin/perl -w
CSM> use strict;
CSM> my $from = "mailer\@testsite\.com";
CSM> my $email = "cmonroe11\@mediaone\.net";
CSM> my $subject = "This is a test mail";
CSM> my $messagebody = "";
CSM> my $mail_program;
CSM> # Initiate the email to the user.
CSM> sub send_mail {
CSM> my ($from, $email, $subject, $messagebody) = @_;
CSM> my $flags = "-t"; # -odq would add it to the queue
CSM> $mail_program = '/bin/sendmail';
CSM> $mail_program .= " $flags";
CSM> open (MAIL, "|$mail_program") || die "Could Not Open Mail Program: $!";
CSM> print MAIL <<__END_OF_MAIL__;
CSM> To: $email
CSM> From: $from
CSM> Reply-to: $from
CSM> Subject: $subject
CSM> Content-Type: text/plain;
CSM> $messagebody
CSM> __END_OF_MAIL__
CSM> close (MAIL);
CSM> } # End of send_mail
CSM> print "Content-type: text/html\n\n";
CSM> print <<"EOF";
CSM> <html>
CSM> <body>
CSM> Sent email:
CSM> $from
CSM> $email
CSM> $subject
CSM> $messagebody
CSM> </body>
CSM> </html>
CSM> EOF
CSM> ----------------------------------------------------------------------------
CSM> Sorry remedial question, but whew this one is getting to me...
well... sorry for a stupid question, but i can not see - where did you call
send_mail() sub?
Best wishes,
Maxim mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]