Is anyone here successfully using Email::Mailer?  I installed it using 
cpanm a couple of days ago on my Mac and I can’t get it to work.  It just 
prints the following output and nothing more:

postdrop: warning: mail_queue_enter: create file maildrop/352468.4276: No such 
file or directory

        It appears to be trying to send it directly from my laptop, but I have 
the SMTP transport variable set up correctly (which works just fine using 
Email::Stuffer, BTW).  I really like what I’ve read about this new module - I 
just need to get past this hurdle.

        Everything installed correctly and there are no error messages, so I’m 
at a loss as to what to try next.

Thanks,
Frank


#!/usr/bin/env perl

use 5.024;
use warnings;

use Email::Mailer;
use Email::Sender::Transport::SMTP;

my $to   = ‘xxx';
my $from = ‘xxx';
my $password = ‘xxx';
my $subject = 'Hello';
my $text = "This email was sent via Email::Mailer.\n\n";

my $transport = Email::Sender::Transport::SMTP->new(
    host          => ‘my.mail.server.com',
    port          => 587,
    sasl_username => $from,
    sasl_password => $password,
    debug         => 1,
) or die "Error creating multipart container: $!\n";

Email::Mailer->send(
    to        => $to,
    from      => $from,
    subject   => $subject,
    text      => $text,
    transport => $transport,
) or die "Couldn't send email.";
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to