Hi guys,
I’m having real trouble setting up eForm to use SMTP with my Google hosted mail. I’ve searched the forum repeatedly and check the docs for eForm and phpmailer without any luck. At the moment it just errors every time.
I’ll recount the steps I’ve taken so far:
1. in class.phpmailer.php I’ve changed the lines to the suggested values and
nothing else:
var $Mailer = "smtp";
var $Host = "smtp.gmail.com";
var $Port = 587;
var $SMTPAuth = true;
var $Username = "[email protected]";
var $Password = "password";
2. In eform.inc.php I’ve changed and added the following wherever I found ’$mail->IsMail();’:
//Changed
$mail->IsSMTP();
//Added
$mail->Host = "smtp.google.com";
$mail->SMTPAuth = true;
$mail->Mailer = "smtp";
$mail->Port = 587;
$mail->Username = "[email protected]";
$mail->Password = "password";
3. My Snippet call:
[!eForm? &formid=`EmailForm` &subject=`Website Inquiry` &to=`[email protected]` &ccsender=`0` &tpl=`contact-form` &report=`ContactFormReport` &gotoid=`49`!]
4. The error:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: fsockopen() [function.fsockopen]: unable to connect to smtp.google.com:587 (Connection timed out)
Error type/ Nr.: Warning - 2
File: /home/public_html/manager/includes/controls/class.smtp.php
Line: 104
Line 104 source: $tval); # give up after ? secs
I’m using Modx 0.9.6.2 and eForm 1.4.4.5.
Any help would be greatly appreciated. Thanks, Jamie