Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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\", "myemail\", "Test perl mail +",

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

Replies are listed 'Best First'.
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 => '', From => '', 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: Subject: To: Result: 250 2.0.0 q777vw5b026359 Message accepted for delivery

        But i dont find any messages in inbox.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985906]
[choroba]: use C instead of H to get the decimal number
[erix]: ( no love like f love )
[choroba]: f* love

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2018-02-20 16:40 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (272 votes). Check out past polls.