CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Advanced:
How to send email through Gmail using SendMail


Limor Bortman

May 23, 2010, 1:50 AM

Post #1 of 2 (1907 views)
How to send email through Gmail using SendMail Can't Post

Hi All
I am tiring to send email with a Perl script through Gmail and I get this error message:
530 5.7.0 Must issue a STARTTLS command first.
This is my cod:

use SendMail 2.09;

# Create the object without any arguments,
$sm = new SendMail("");
# Set SMTP AUTH login profile.
$sm->setAuth($sm->AUTHLOGIN,"evolven\, "evolven");
#$sm->setAuth($sm->AUTHPLAIN, "username", "password");

# We set the debug mode "ON".




$sm->setMailBody("test data");

# Check if the mail sent successfully or not.
if ($sm->sendMail() != 0) {
print $sm->{'error'}."\n";
exit -1;

# Mail sent successfully.
print "Done\n\n";
exit 0;

can you please help me?


Jun 28, 2010, 1:33 AM

Post #2 of 2 (1777 views)
Re: [Limor Bortman] How to send email through Gmail using SendMail [In reply to] Can't Post

Do you have a documentation of this module?
I think you have to send first a command to initiate a secure connection.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives