gryphonshafer / Email-Mailer

Multi-purpose emailer for HTML, auto-text, attachments, and templates
1 stars 1 forks source link

transport not passed to Email::Sender::Simple->sendmail properly #1

Closed bigpresh closed 7 years ago

bigpresh commented 7 years ago

From trying to help someone on the beginners@perl.org mailing list having a problem with Email::Mailer ignoring a transport: http://www.mail-archive.com/beginners%40perl.org/msg119395.html

... I think he found a bug in Email::Mailer.

Email::Mailer sends the email with:

    # send the email with Email::Sender::Simple
    sendmail( $email_mime, $mail->{transport} );

but looking at Email::Sender::Simple->send_email(), :

    sub send_email {
        my ($class, $email, $arg) = @_;

        my $transport = $class->default_transport;

        if ($arg->{transport}) {
            ...

So, Email::Sender::Simple->send_email() is expecting the second parameter passed to it to be a hashref containing a 'transport' key, but it's getting passed an Email::Sender::Transport::SMTP object instead, and ignoring it.

gryphonshafer commented 7 years ago

Yes, looks like a bug. Should be trivial to fix, but it'll take me a few minutes to spin up an environment. I should have a new version released shortly thereafter.

gryphonshafer commented 7 years ago

OK, this should be resolved now under v1.05, just released. Should show up on CPAN in a few hours.

bigpresh commented 7 years ago

Fantastically quick response :) Thanks!