Hi all. I am trying to send an HTML email using Mime::Lite. However, I use SMTP and my email provider requires me to use authentication. Taking a look at the Mime::Lite docs, it's not really clear. Can someone help me out?
This is the code I have so far. (OK, so I'm using MIME::Lite::TT::HTML, but this uses Mime::Lite for send.)
#!/usr/bin/perl
use strict;
use warnings;
use MIME::Lite::TT::HTML;
my %params;
my %options;
$options{INCLUDE_PATH} = 'c:/Documents and Settings/Uriel/My Documents
+/Sandbox/perl/';
my $msg = MIME::Lite::TT::HTML->new(
From => 'admin@example.com',
To => 'test@yahoo.com',
Subject => 'Hello world',
Template => {
text => 'test.txt',
html => 'test.html',
},
TmplOptions => \%options,
TmplParams => \%params,
);
$msg->send('smtp', 'smtp.mail.yahoo.com', Timeout => 60 );