SMTP Authentication problem

Why not just install a module that supports SMTP with SASL? One of the advantages of Strawberry Perl is that you can easily install modules from CPAN.

SMTP Authentication problem

Why not just install a module that supports SMTP with SASL? One of the advantages of Strawberry Perl is that you can easily install modules from CPAN.

For example, Email::Simple and Email::Sender:

use strict;
use warnings;
use Email::Sender::Simple qw(sendmail);
use Email::Simple;
use Email::Simple::Creator;
use Email::Sender::Transport::SMTP;

my $email = Email::Simple->create(
  header => [
    To      => 'beta@betadomain.com',
    From    => 'alpha@example.com',
    Subject => "sample message",
  ],
  body => "Greetings,\nTyped message (content)\nGoodbye.\n",
);

my $transport = Email::Sender::Transport::SMTP->new({
  host => 'smtp.example.com',
  sasl_username => 'foo',
  sasl_password => 'bar',
});

sendmail($email, { transport => $transport });