Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Send Mail form my PC without using smtp server?

by willyyam (Priest)
on Mar 29, 2005 at 15:32 UTC ( [id://443151]=note: print w/replies, xml ) Need Help??


in reply to Send Mail form my PC without using smtp server?

I might also suggest Mail::Mailer. Here is a proof-of-concept program for you to look at that acts as a Perl-based email transmission client:

#!/usr/bin/perl -w use Mail::Mailer; $smtp = Mail::Mailer->new("smtp","Server","smtp.server"); print "To: "; $to = <STDIN>; chomp($to); print "Subject: "; $subject = <STDIN>; chomp($subject); print "Body:\n"; while ($line = <STDIN>) { last if $line eq ".\n"; $body .= $line; } chomp($body); print "Opening SMTP connection...\n"; $smtp->open({ "From" => "email\@example.com", "To" => $to, "Subject" => $subject }); print $smtp $body; print "Sending email...\n"; $smtp->close() or die "Can't close mailer: $!"; print "Mail sent.\n";

Obviously, using strict is recommended.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://443151]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found