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