Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Questions about sending e-mails

by weismat (Friar)
on Mar 19, 2009 at 17:35 UTC ( #751808=note: print w/ replies, xml ) Need Help??


in reply to Questions about sending e-mails

Perl is platform-independent.
I guess you will not run your own SMTP server. Thus everything depends a bit on the provider of the SMTP server. MIME::Lite can do everything if you are happy with simple smtp. If you need SSL (like yahoo/google), Net::SMTP::SSL is your friend.

my $msg=MIME::Lite->new(From=>$user, To=>join(",", @to_address), Subject=>$0, Data=>$data); my $smtp = Net::SMTP::SSL->new('xxx', Debug=>1, Timeout=>20, Port=>4 +65); $smtp->auth($user, $password) or die "Error message: $smtp->message" +; $status=$smtp->mail(); $status=$smtp->to(@to_address); $status=$smtp->data(); my $msgString=$msg->as_string; $status=$smtp->datasend($msgString); $status=$smtp->dataend(); $status=$smtp->quit();
is a little example...


Comment on Re: Questions about sending e-mails
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2015-07-04 06:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (58 votes), past polls