in reply to how do i send an email with perl in window system
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;
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: Answer: how do i send an email with perl in window system
by Anonymous Monk on Sep 21, 2000 at 23:25 UTC |
In Section
Seekers of Perl Wisdom