Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Send e-mail using perl

by zentara (Archbishop)
on Aug 07, 2012 at 07:55 UTC ( #985906=note: print w/ replies, xml ) Need Help??


in reply to Send e-mail using perl

Try backslashing the @ in your mail addresses, or single quote the strings instead of double quoting.

&sendemail("myemail\@gmail.com", "myemail\@yahoo.com", "Test perl mail +",

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh


Comment on Re: Send e-mail using perl
Download Code
Re^2: Send e-mail using perl
by rbala (Acolyte) on Aug 07, 2012 at 08:10 UTC
    Thanks a lot zentara for ur suggestion. Now the script does not throw any errors, but executing the script does not show anything in terminal window.The terminal was struck for a while without any response after sometime , prompt returned.

    Checked the mail inbox but mail not arrived.

    I have got one more doubt also, how authentication can done ie. entering mail password for sending/receiving mails. Pls advise....
        Using Mail::Sender module and printed the log message. See the below code:
        #! /usr/bin/perl -w use Mail::Sendmail; %mail = ( To => 'xxx@gmail.com', From => 'yyy@gmail.com', Message => "This is a very short message" ); sendmail(%mail) or die $Mail::Sendmail::error; print "OK. Log says:\n", $Mail::Sendmail::log;
        The following log message is obtained:

        OK. Log says: Mail::Sendmail v. 0.79_16 - Tue Aug 7 13:27:58 2012 Date: Tue, 7 Aug 2012 13:27:58 +0530 Server: localhost Port: 25 From: xxx@gmail.com Subject: To: yyy@gmail.com Result: 250 2.0.0 q777vw5b026359 Message accepted for delivery

        But i dont find any messages in inbox.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2014-07-25 16:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (174 votes), past polls