T
Ted Byers
I am using Activestate perl 5.10.0 on WXP, if that matters.
I can get all the examples to work properly for trivially simple
emails. However, the following:
MIME::Lite->send('smtp','smtp.gmail.com',AuthUser=>$un, AuthPass=>
$pw, Timeout => 60);
produces the error:
SMTP auth() command not supported on smtp.gmail.com
If I remove the credentials, I get an error about the need to
establish a secure channel, specifically:
SMTP mail() command failed:
5.7.0 Must issue a STARTTLS command first. 11sm9055536vcp.45
Alas, MIME::Lite documentation makes no mention of anything related to
possible issues using stml.gmail.com and thus the question is, "What
needs to be done to set MIME::Lite up to use gmail properly?" A
related question is "What needs to be changed from the usual
configuration in order to use a gmail account that has a domain
different from gmail.com?"
Yes, I did see Email::Send::Gmail, but it is not clear how to use it
in a manner equivalent to:
my $msg = MIME::Lite->new(
From => $sender,
To => $recipient,
Subject => $subject_line,
Type =>'multipart/related'
);
$msg->attach(Type => 'text/html',
Data => $html_template,
);
$msg->attach(Type => 'image/jpg',
Id => 'logo.jpg',
Path => 'template.files/image002.jpg',
);
MIME::Lite->send('smtp','smtp.gmail.com',AuthUser=>$un, AuthPass=>
$pw, Timeout => 60);
$msg->send();
Thanks,
Ted
I can get all the examples to work properly for trivially simple
emails. However, the following:
MIME::Lite->send('smtp','smtp.gmail.com',AuthUser=>$un, AuthPass=>
$pw, Timeout => 60);
produces the error:
SMTP auth() command not supported on smtp.gmail.com
If I remove the credentials, I get an error about the need to
establish a secure channel, specifically:
SMTP mail() command failed:
5.7.0 Must issue a STARTTLS command first. 11sm9055536vcp.45
Alas, MIME::Lite documentation makes no mention of anything related to
possible issues using stml.gmail.com and thus the question is, "What
needs to be done to set MIME::Lite up to use gmail properly?" A
related question is "What needs to be changed from the usual
configuration in order to use a gmail account that has a domain
different from gmail.com?"
Yes, I did see Email::Send::Gmail, but it is not clear how to use it
in a manner equivalent to:
my $msg = MIME::Lite->new(
From => $sender,
To => $recipient,
Subject => $subject_line,
Type =>'multipart/related'
);
$msg->attach(Type => 'text/html',
Data => $html_template,
);
$msg->attach(Type => 'image/jpg',
Id => 'logo.jpg',
Path => 'template.files/image002.jpg',
);
MIME::Lite->send('smtp','smtp.gmail.com',AuthUser=>$un, AuthPass=>
$pw, Timeout => 60);
$msg->send();
Thanks,
Ted