The following code, which is distilled from your example, works fine for me. Just a guess, perhaps you have an old version of one of the modules in one of your many use lib directories? Also, since you seem to be using PAR (I think?), have you tried running the script outside of that?
use warnings; use strict; use Email::MIME; use Email::Sender::Simple 'sendmail'; use Email::Sender::Transport::SMTP; my $message = Email::MIME->create( header_str => [ From => 'test@example.com', To => $ENV{USER}.'@localhost', Subject => 'Happy birthday!', ], attributes => { encoding => 'quoted-printable', charset => 'ISO-8859-1', }, body_str => "Happy birthday to you!\n", ); sendmail($message, { from => 'test@example.com', transport => Email::Sender::Transport::SMTP->new( { host => 'localhost', port => 25 }), });
In reply to Re: How to send email using Email::MIME & Email::Sender::Simple?
by haukex
in thread How to send email using Email::MIME & Email::Sender::Simple?
by Magkumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |