Support ⇒ Troubleshootings ⇒ emailer.php - includes gmail patch on page 2 ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexTroubleshootings

emailer.php - includes gmail patch on page 2 Reply to topic


Thats odd, because i tried using TLS in Thunderbirs for my dazzajay @ potholestudios.com address, and it didnt work, got some error, but SSL works fine on the SMTP side of things.

so how do i get it to use the correct port and SSL?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
DebianLenny / Apache2.2.9 / MySQL5.0.51a-24+lenny3-log / PHP5.2.6-1+lenny8 / Dragonfly 9.2.1


But after all its just a matter of protocols. The following is a quick alpha patch:

includes/classes/phpmailer.php from line 540
if(strstr($hosts[$index], ':')) list($host, $port) = explode(':', $hosts[$index]); else { $host = $hosts[$index]; $port = $this->Port; }

CHANGE TO:
if (preg_match('#(([lst]+://)?[^:]+):(\d+)#i', $hosts[$index], $match)) { $host = $match[1]; $port = $match[3]; } else if (preg_match('#(([lst]+://)?[^:]+)$#i', $hosts[$index], $match)) { $host = $match[1]; $port = $this->Port; } else if (strstr($hosts[$index], ':')) { list($host, $port) = explode(':', $hosts[$index]); } else { $host = $hosts[$index]; }

Then in admin -> main settings -> smtp make sure you have
"Use SMTP server as opposed to PHP's mailer" - "Yes"
"SMTP host address (smtp.host.tld)" - "ssl://smtp.gmail.com:465"
"Does server require SMTP authorization" - "Yes"
then just use your gmail account username and password.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


Well, that completley fixed the previous issue, but created a new one....

ncludes/classes/smtp.php

* Warning line 105: fsockopen() [function.fsockopen]: unable to connect to smtp.googlemail.com:465 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
DebianLenny / Apache2.2.9 / MySQL5.0.51a-24+lenny3-log / PHP5.2.6-1+lenny8 / Dragonfly 9.2.1


"SMTP host address (smtp.host.tld)" - "ssl://smtp.gmail.com:465"

if that doesn't work use

"SMTP host address (smtp.host.tld)" - "tls://smtp.gmail.com:587"

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


the address google tells me to use is smtp.googlemail.com

and if you mouse over the smtp thing in the quotebox, you will find it does have ssl:// infront of it, just dragonfly decided to make it a link.

and with tls:// infront of it, it said "Mailer Error: SMTP Error: Could not connect to SMTP host."

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
DebianLenny / Apache2.2.9 / MySQL5.0.51a-24+lenny3-log / PHP5.2.6-1+lenny8 / Dragonfly 9.2.1


I'm asking you to try what I've posted, if you prefer no to do that its fine by me.

But if you do try what I've posted and you still get
"Warning line 105: fsockopen() [function.fsockopen]: unable to connect to smtp.googlemail.com:465 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)"

then tell your host to enable ssl protocol in php.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


My web hoster hasnt replied to an email for months.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
DebianLenny / Apache2.2.9 / MySQL5.0.51a-24+lenny3-log / PHP5.2.6-1+lenny8 / Dragonfly 9.2.1


Their mail server is currently broken and they never reply to your support requests. I'm wondering why you still whit them.

Back to topic, at this point looks like you have no way to use a secure socket layer connection for your emails since its not enabled at PHP level.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


Well, the reason why im still with them is, i have a Windows game server, and im installing WAMP on it to host the site, (thats taking a bit to learn) never done anything with servers before...

Once i get it up, i will move the site to my own server.

The main reason why i went with X-Serverz is...
$50US a YEAR, for 600GB bandwidth and 100GB Space a month.

iil post back if i ever get this damn new server working.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
DebianLenny / Apache2.2.9 / MySQL5.0.51a-24+lenny3-log / PHP5.2.6-1+lenny8 / Dragonfly 9.2.1


DazzaJay wrote
The main reason why i went with X-Serverz is...
$50US a YEAR, for 600GB bandwidth and 100GB Space a month.


That should not be the main reason to use a host. Confused

It would be the reliability of the server is what you are suppose to be looking for.

Lead Theme Designer - WebSiteGuru Designs

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.9 / Apache 2.2.6 / MySQL 5.0.27 / PHP 5 / DF Version 9.2.1


Plus you can get reliable service that does support DF, for that sort of cost!

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


Well, when i first joined them, they were verry reliable, 99.9% uptime. but, over time, they have overloaded their servers.

so they baught a new server, put half of everyone on it. overloaded that server too, and the old one, then Got rid of the new server (which was an 8 core) and put EVERYONE back on the crappy 4 core.

So now, im moving the website to my Game server.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
DebianLenny / Apache2.2.9 / MySQL5.0.51a-24+lenny3-log / PHP5.2.6-1+lenny8 / Dragonfly 9.2.1


Then I would suggests that you move your server before continuing with this. It might even solved your email issue at the same time. If the Mail server on the new host works.

Lead Theme Designer - WebSiteGuru Designs

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux 2.6.9 / Apache 2.2.6 / MySQL 5.0.27 / PHP 5 / DF Version 9.2.1


We have allmost finished moving it to the new server, its taken DAYS, with lots of issues.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
DebianLenny / Apache2.2.9 / MySQL5.0.51a-24+lenny3-log / PHP5.2.6-1+lenny8 / Dragonfly 9.2.1


Ok, now the site is running on the new server.

New error messages about mail.

Using the PHP Mailer:
Message could not be sent.
Mailer Error: Could not instantiate mail function.


Using Googlemail SMTP
Message could not be sent.
Mailer Error: SMTP Error: Could not connect to SMTP host.

This is a server we have Full complete access to, running WAMPserver, so if we need to change any options in the server itself we can. but i will need to be walked thru it.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
DebianLenny / Apache2.2.9 / MySQL5.0.51a-24+lenny3-log / PHP5.2.6-1+lenny8 / Dragonfly 9.2.1

All times are UTC


Jump to: