Re: Send email using SMTP

[email protected] (Adam Jimerson) Wed, 07 Jan 2009 10:11:43 -0500
Newsgroups perl.beginners.cgi
Organization se
Message-ID <[email protected]>
"Fúlvio Figueirôa" wrote:

> Hi Sean,
> I think there is a firewall, but I don't have access to it because I am on
> work.
> I solved my problem using the sendmail with the code below in my script:
> 
> open (MAIL, "|/usr/sbin/sendmail -t ");
> print MAIL "From: someaddres\@somedomain\n";
> print MAIL "To: someaddress\@somedomain\n";
> print MAIL "Content-Type: text/plain\n";
> print MAIL "Subject: Very simple email test\n\n";
> print MAIL "Body of the message";
> close (MAIL);
> 
> Thanks for your help
> 
> Fúlvio
> 

This is kind of off topic, but are you using the -T switch on your script?  
When I tried to open "/usr/bin/mail" with that switch on I get a error 
message about an insecure environment command.   For right now I disabled 
the -T switch until I can figure out what the problem is.