I have email sending code which doesn't work without any error messages (by "doesn't work" i mean all seams OK but i have no message in my mail box):
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";}
Could you give me a hint what's wrong with it?