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 :-(

In reply to Re^2: Recommendation for email sending modules please by palkia
in thread Recommendation for email sending modules please by palkia

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.