Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

How to send mail automatically using MIME::Lite

by vkp (Novice)
on Apr 08, 2014 at 15:38 UTC ( #1081517=perlquestion: print w/ replies, xml ) Need Help??
vkp has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I am got a task to send Email so some group of people. This mail is to be send as per a scheduled calender. For this i am using MIME::Lite . Here is part of my code:

#!/usr/bin/perl -w use strict; use MIME::Lite; my $msg = MIME::Lite->new( From => 'xyz@yahoo.com', To => 'xyz@yahoo.com', Subject => 'TESTMSG' ); my $user="xyz"; my $pass="abc"; MIME::Lite->send('smtp','yahoo.com',AuthUser=>$user,AuthPass=>$pass);

Some times it shows Cannot connect to server, and sometimes nothing happens. My work field is actually related to electronics. So i have a very less knowledge about these SMTP server etc. things. Please help me for this work. Its urgent for me. If there is any other way to do so please explain. Thanks

Comment on How to send mail automatically using MIME::Lite
Download Code
Re: How to send mail automatically using MIME::Lite
by hippo (Curate) on Apr 08, 2014 at 15:52 UTC

    According to the MIME::Lite documentation, that code won't actually send anything. If you read it more closely you will see that you still have to call the "send" method on your $msg object. Try that.

    FWIW, I'd be a bit surprised if "yahoo.com" were actually an SMTP server, but you never know.

Re: How to send mail automatically using MIME::Lite
by karlgoethebier (Curate) on Apr 08, 2014 at 17:04 UTC

    BTW - please wait!

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1081517]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2014-11-26 04:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (162 votes), past polls