I think the following page could help you.
-----Original Message-----
From: Rand Cufley [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 12:55 PM
To: 'Eric Peers'; [EMAIL PROTECTED]
Subject: RE: parsing a domain name out of an email address
Hi Eric,
I believe you need a blank line after the email header before you start your
message body.
-Rand
-----Original Message-----
From: Eric Peers [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 15, 2002 11:50 AM
To: Tim Doty; [EMAIL PROTECTED]
Subject: Re: parsing a domain name out of an email address
Thank you. That helped get the script to compile. Neither file is being
opened, but that me be a permissions issue. I've expanded the code out a
bit (and made a correction to the if/then statement):
my $EmailAddress = $to;
if ($EmailAddress =~ (/^\w+\@aol\.com$/i)) {
my $msg = "/www/docs/sips_mar02aol.txt";
my $ContentType = "Content-Type: text/x-aol\n\n";
} else {
my $msg = "/www/docs/sips_mar02.html";
my $ContentType = "Content-Type: text/html\n\n";
}
open(MSG, "$msg") or die "Can't open $msg: $!\n";
print MAIL "To: $to\n";
print MAIL "From: $fromaddr\n";
print MAIL "Reply-to: $replyaddr\n" if $replyaddr;
print MAIL "X-Mailer: Perl Mailer\n";
print MAIL "Subject: $subject\n";
print MAIL "$ContentType";
while (my $text = <MSG>){
print MAIL "$text";
}
print MAIL "\n.\n";
close(MSG);
The purpose of the program is to email the contents of one of the files to a
requestor. Aol has particular formatting needs if the email is being sent
other than text from outside their network. Anyway, I'm certain why the the
script is failing to send the email. I'm sure its something simple.
Eric
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Sending email using perl and sendmail..url
Description: Binary data
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]