I am not using Gmail for PHPList, but I am wishing to use SMTP Relay from within my GoDaddy account which uses SSL and port 465 for SMTP. Instead of PHPMailer 2.0, I've tried 5.1. Also, I am on the current version of PHPList ( 2.10.14). I have tried to follow the steps put forth by everyone that says they have it working with Gmail except for substituting the URL for SMTP server. Examples of what I've done...
/admin/class.phplistmailer.php
- Code: Select all
require( dirname(__FILE__) . '/phpmailer5/class.phpmailer.php');
require_once( dirname(__FILE__) . '/phpmailer5/class.pop3.php'); require( dirname(__FILE__) . '/phpmailer5/class.smtp.php');
...
...
...
if (defined('PHPMAILERHOST') && PHPMAILERHOST != '') {
$this->SMTPAuth = true;
$this->Helo = getConfig("PHPMAILERHOST");
$this->Host = PHPMAILERHOST;
if (isset($GLOBALS['phpmailer_smtpport']) && $GLOBALS['phpmailer_smtpport'] != '') {
if($GLOBALS['phpmailer_smtpport'] == '465'||$GLOBALS['phpmailer_smtpport'] == '995')
{
$this->SMTPSecure="ssl";
}
$this->Port=$GLOBALS['phpmailer_smtpport'];
}
if (isset($GLOBALS['phpmailer_smtpuser']) && $GLOBALS['phpmailer_smtpuser'] != '') {
$this->SMTPAuth=true;
$this->Username=$GLOBALS['phpmailer_smtpuser'];
$this->Password=$GLOBALS['phpmailer_smtppassword'];
}
$this->Mailer = "smtp";
$this->IsSMTP();
I had tried the
POP before SMTP but ended up commenting it out, as I got errors with it too. I left the "reequire_once" for the
POP before SMTP uncommented out because I figured there was no harm. I obviously put PHPMailer 5.1 into the directory "/admin/phpmailer5".
/admin/phpmailer5/class.smtp.php
- Code: Select all
function SMTP() {
$this->smtp_conn = fsockopen($host='ssl://smtpout.secureserver.net');
$this->error = null;
$this->helo_rply = null;
$this->do_debug = 0;
}
In the recommendation to change the line with the "fsockopen" in it, there appeared to be a syntax error... the line ended with "fsockopen($host='ssl://smtp.gmail.com'," when (with changing for different service), "fsockopen($host='ssl://smtpout.secureserver.net');"
FINALLY... /config/config.php
- Code: Select all
define("PHPMAILER",1);
define("PHPMAILERHOST",'smtpout.secureserver.net');
$phpmailer_smtpuser = '<MyEmailAddress>';
$phpmailer_smtppassword = '<MyPassword>';
$phpmailer_smtpport = '465';
$phpmailer_smtpsecure = 'ssl'; $phpmailer_popuser = $bounce_mailbox_user; $phpmailer_poppassword = $bounce_mailbox_password;
Despite all this, I constantly get "Mailer Error: SMTP Error: Could not connect to SMTP host" in the event log. Can anyone point out where I went wrong?