Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Recommendation for email sending modules please

by palkia (Monk)
on Sep 16, 2011 at 02:41 UTC ( [id://926292]=note: print w/replies, xml ) Need Help??


in reply to Re: Recommendation for email sending modules please
in thread Recommendation for email sending modules please

Thx
I tried the 1st example but it didn't work from some reason.
Please tell me what I'm doing wrong.
use Email::Simple; use Email::Sender::Simple qw(sendmail); my $email = Email::Simple->create( header => [ From => 'a real email', To => 'my real email', Subject = +> "zzz" ], body => 'it work !', #no it's not ); sendmail($email);
But it died saying
unable to establish SMTP connection Trace begun at C:\strawberry\perl\site\lib\Email\Sender\Transport\SMTP +.pm line 9 5 Email::Sender::Transport::SMTP::_throw('Email::Sender::Transport::SMTP +=HASH(0x14 c7b04)', 'unable to establish SMTP connection') called at C:\strawberr +y\perl\sit e\lib\Email\Sender\Transport\SMTP.pm line 62 Email::Sender::Transport::SMTP::_smtp_client('Email::Sender::Transport +::SMTP=HAS H(0x14c7b04)') called at C:\strawberry\perl\site\lib\Email\Sender\Tran +sport\SMTP .pm line 104 Email::Sender::Transport::SMTP::send_email('Email::Sender::Transport:: +SMTP=HASH( 0x14c7b04)', 'Email::Abstract=ARRAY(0x38b1c)', 'HASH(0x12012a4)') call +ed at C:\s trawberry\perl\site\lib\Email\Sender\Role\CommonSending.pm line 27 Email::Sender::Role::CommonSending::__ANON__ at C:\strawberry\perl\sit +e\lib\Try\ Tiny.pm line 76 eval {...} at C:\strawberry\perl\site\lib\Try\Tiny.pm line 67 Try::Tiny::try('CODE(0x1545c44)', 'Try::Tiny::Catch=REF(0x1541a64)') c +alled at C :\strawberry\perl\site\lib\Email\Sender\Role\CommonSending.pm line 37 Email::Sender::Role::CommonSending::send('Email::Sender::Transport::SM +TP=HASH(0x 14c7b04)', 'Email::Abstract=ARRAY(0x38b1c)', 'HASH(0x14c8414)') called + at C:\str awberry\perl\site\lib\Email\Sender\Simple.pm line 110 Email::Sender::Simple::send_email('Email::Sender::Simple', 'Email::Abs +tract=ARRA Y(0x38b1c)', 'HASH(0x1201334)') called at C:\strawberry\perl\site\lib\ +Email\Send er\Role\CommonSending.pm line 27 Email::Sender::Role::CommonSending::__ANON__ at C:\strawberry\perl\sit +e\lib\Try\ Tiny.pm line 76 eval {...} at C:\strawberry\perl\site\lib\Try\Tiny.pm line 67 Try::Tiny::try('CODE(0xd0a83c)', 'Try::Tiny::Catch=REF(0x1283bdc)') ca +lled at C: \strawberry\perl\site\lib\Email\Sender\Role\CommonSending.pm line 37 Email::Sender::Role::CommonSending::send('Email::Sender::Simple', 'Ema +il::Simple =HASH(0x99659c)') called at C:\strawberry\perl\site\lib\Sub\Exporter\U +til.pm lin e 69 Sub::Exporter::Util::__ANON__('Email::Simple=HASH(0x99659c)') called a +t C:\Docum ents and Settings\Administrator\Desktop\perl experiments\mail sender.p +l line 9
So I tried to add a use Email::Simple::Creator; line
but nothing changed.

help :-(

Replies are listed 'Best First'.
Re^3: Recommendation for email sending modules please
by duelafn (Parson) on Sep 17, 2011 at 13:53 UTC
      Running a server ???
      Don't I just need to refer it to
      C:\Program Files\Git\bin\msmtp.exe or something like that ?
      That was the idea I got from Email::Sender,
      or is that counts as running a server ?
      Your 1st link refers to a "host" & a "port", how can I figure out what should these be set to ?

      Thx

        You will need to ask your ISP for the host and port of the ISPs mailserver if you are not running your own. You can also try to send the mail directly to the recipients mailserver, but many mailservers reject mails from dial-up or residential IP addresses.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-03-19 07:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found