Gangabass has asked for the wisdom of the Perl Monks concerning the following question:
Could you give me a hint what's wrong with it? UpdateThanks all for the answers. Now i'm using Email::Send::Gmail and the problem is solved. But the question is still in my head: why this code don't work on one of my machine and works on another?use strict; use warnings; use Email::Send; use Email::Simple::Creator; report_update(); sub report_update { my $mailer = Email::Send->new( { mailer => 'SMTP::TLS', mailer_args => [ Host => 'smtp.gmail.com', Port => 587, User => $CONFIG{EMAIL_USER}, Password => $CONFIG{EMAIL_PASS}, Hello => 'localhost', ] } ); my $email = Email::Simple->create( header => [ From => $CONFIG{EMAIL_USER}, To => $CONFIG{TARGET_EMAIL}, Subject => 'Updated info finded!', ], body => 'Updated info finded!', ); eval { $mailer->send($email) }; die "Error sending email: $@" if $@; print "Finished!\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sending email via Gmail
by wind (Priest) on Jul 22, 2011 at 17:06 UTC | |
|
Re: Sending email via Gmail
by afoken (Chancellor) on Jul 22, 2011 at 16:56 UTC | |
by Gangabass (Vicar) on Jul 23, 2011 at 11:48 UTC | |
|
Re: Sending email via Gmail
by zentara (Cardinal) on Jul 22, 2011 at 17:12 UTC |