When facing similar things, I use the smtp method of Mail::Mailer (which depends on elements of the Net bundle).
The following example sends an e-mail composed from a terminal window. Obviously you'd need to configure the variables to your situation.
use Mail::Mailer; print "\nTo: "; $dest = <>; chomp $dest; print "Subject: "; $subj = <>; chomp $subj; print "\nBody:\n"; $body = <>; $mailer = Mail::Mailer->new( 'smtp', Server => 'pilot.msu.edu' ); $mailer->open( { From => 'Mr Grits <moranjon@pilot.msu.edu>', To => $dest, Subject => $subj, } ) or die "mailer->open failed: $!\n"; print $mailer $body; $mailer->close;
In reply to Re: how do i send an email with perl in window system
by Anonymous Monk
in thread how do i send an email with perl in window system
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |