PHP Classes

gmail configuration

Recommend this page to a friend!

      SMTP E-mail sending class  >  All threads  >  gmail configuration  >  (Un) Subscribe thread alerts  
Subject:gmail configuration
Summary:Returning error message
Messages:3
Author:lineshjose
Date:2011-02-04 21:13:23
Update:2011-02-06 01:54:11
 

  1. gmail configuration   Reply   Report abuse  
Picture of lineshjose lineshjose - 2011-02-04 21:13:23
hi

I'm new to php. I configured gmail authentication like this

$smtp->host_name="smtp.gmail.com";
$smtp->host_port=465;
$smtp->ssl= 465;
$smtp->http_proxy_host_name='';
$smtp->http_proxy_host_port=3128;
$smtp->socks_host_name = '';
$smtp->socks_host_port = 1080;
$smtp->socks_version = '5';

$smtp->start_tls=587;
$smtp->localhost="localhost";
$smtp->direct_delivery=0;
$smtp->timeout=10;
$smtp->data_timeout=0;

$smtp->debug=1;
$smtp->html_debug=1;
$smtp->pop3_auth_host="";
$smtp->realm="";
$smtp->user="my_user_name@gmail.com";
$smtp->password="my_password";
$smtp->workstation="";
$smtp->authentication_mechanism="LOGIN";

but it returned this error message

Resolving SMTP server domain "smtp.gmail.com"...
Connecting to host address "74.125.93.109" port 465...
Could not send the message to "my_user_name@yahoo.com". Error: could not connect to the host "smtp.gmail.com": Connection timed out.


Please help me to configure the gmail settings..



  2. Re: gmail configuration   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-02-05 06:39:21 - In reply to message 1 from lineshjose
You are using values that do not make sense.

I recommend that instead you use the MIME message class together with this class.

phpclasses.org/mimemessage

Also read this article to learn how to set the MIME message and SMTP message classes to send messages via Gmail:

phpclasses.org/blog/package/9/post/ ...

  3. Re: gmail configuration   Reply   Report abuse  
Picture of lineshjose lineshjose - 2011-02-06 01:54:14 - In reply to message 2 from Manuel Lemos
It works!

Thank you for your advice and Script . That's really helped me .once again thank you..

Linesh Jose
www.lineshjose.com