Using Gmail as SMTP server: XAMPP config?
Sat, 06/13/2009 - 15:03
I am sorry for putting a non Qcubed related question. Please guide me on this.
After going through handful of links on qcubed as well as qcodo, I modified email.php on the examples folder. I have got following lines to connect to gmail:
<?php
QEmailServer::$SmtpServer = 'sslv2://smtp.gmail.com';
QEmailServer::$SmtpPort = 465;
QEmailServer::$AuthLogin = true;
QEmailServer::$SmtpUsername = <em>my email-id here</em>;
QEmailServer::$SmtpPassword = <em>my password here</em>;
$objMessage = new QEmailMessage();
$objMessage->From = <em>my email address here</em>;
$objMessage->To = <em>my 2nd email address here</em>;
$objMessage->Subject = 'Report for ' . QDateTime::NowToString(QDateTime::FormatDisplayDate);
?>I have XAMPP server on the windows environment, I think some config is needed to be done. I get the following error message on executing the email.php:
http://pastebin.com/m1fc6e934
Please help. Thanks.

You should edit the line in apache\bin\php.ini where it says
;extension=php_openssl.dll
just remove the ";", so it reads
extension=php_openssl.dll
restart apache afterwards
Just tested it, it works :)
regards,
Kristof
thanks a lot Kmeirlaen.
One ore thing, does a site with cpanel running php5+ require any setting too? Or is it already on there?
Thanks
Hi all,
Just tried the settings you mentionned but it still doesn't work for me.
1. mod openssl is active. (double checked the phpinfo() )
2. host is set to sslv2://smtp.gmail.com
3. user and password are fine since I can connect without issues using Microsoft Outlook
here is the error message I receive :
fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to sslv2://smtp.gmail.com:465 (Connection timed out)I tried ssl://smtp.gmail.com, but still the same error.
Anyone has any clue on what else I can try ?
Thanks for your help.
Mike
Try port 993 instead of 465
Brynjar