Gossamer Forum
Home : General : Perl Programming :

Sendmail error

Quote Reply
Sendmail error
Hi...I took this code from a book and I thought it would work but instead it gives me an error about "No recipient addresses found in header "

Here's the code:
Code:
open (MAIL, "|/usr/bin/sendmail -t");
PRINT MAIL "To: test\@test\.com\n";
PRINT MAIL "From: $email\n";
PRINT MAIL "Subject: Order $order\n\n";
PRINT MAIL "content here\n";
CLOSE(MAIL);

Anybody have ideas?

Thanks!
Quote Reply
Re: Sendmail error In reply to
Put like this:
Code:
open (MAIL, "|/usr/bin/sendmail -t");
PRINT MAIL "To: test\@test.com\n";
PRINT MAIL "From: $email\n";
PRINT MAIL "Subject: Order $order\n\n";
PRINT MAIL "content here\n";
CLOSE(MAIL);

The only diference is the "To:" field


------------------
Rogerio Morais
http://www.rogerle.com
Quote Reply
Re: Sendmail error In reply to
Hi Roger,
Thanks for the suggestion. Unfortunately I tried it and it didn't work...
Quote Reply
Re: Sendmail error In reply to
What's the message error you receive?
It's the same?


------------------
Rogerio Morais
http://www.rogerle.com
Quote Reply
Re: Sendmail error In reply to
I fixed it! I'm a very stupid man. I type PRINT in caps instead of print in lowercase!

Whew!

Cheers!