• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SMTP Email Setup and Troubleshooting

#1
Hello,
CI 3.x

I have created a /config/email.php config file.

I have this set:
PHP Code:
$config['protocol'] = 'smtp';
// $config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;
$config['smtp_host'] = 'mail.jonespublishing.com';
$config['smtp_user'] = '<someuser>@jonespublishing.com';
$config['smtp_pass'] = '<pass>'


I'm at a loss how to troubleshoot this... as I don't have access to the mail.jonespublishing.com logs.  Relaying from this IP should be allowed.

Ideas?
Thx,
Donovan
Reply

#2
No thoughts?

I'm using CPANEL and CI 3.x.

Depending on what I put in the config, and how I enact the config.. the two prominent errors are:
'Failed to send AUTH LOGIN'
'Unable to send email using PHP SMTP'

Note, if I change the protocol to mail or sendmail, debugger shows it successfully sends.. but I still never the email.

Very frustrating.

Latest Code:
PHP Code:
                                       $config = array(
 
                                           'protocol' => 'sendmail'// smtp, mail, sendmail
 
                                           'smtp_host' => 'mail.somedomain.com',
 
                                           'smtp_port' => 25,
 
                                           'smtp_user' => 'donovanb@somedomain.com',
 
                                           'smtp_pass' => '*****',
 
                                           'mailtype'  => 'text',
 
                                           'charset'   => 'iso-8859-1',
 
                                           'crlf' => "\r\n",
 
                                           'smtp_keepalive' => TRUE,
 
                                           // 'smtp_crypto' => 'tls',
 
                                           // 'newline' => "\\r\\n",
 
                                           'wordrap' => TRUE
                                        
);
 
                                       $this->load->library('email'$config);
 
                                       $this->email->set_newline("\r\n");

 
                                       $this->email->from('webmaster@somedomain.com''title');
 
                                       $this->email->to($vEmail);
 
                                       $this->email->subject('blah blah blah');
 
                                       $this->email->message('Testing the email class.');

 
                                       $vEresult $this->email->send(FALSE);
 
                                       echo $this->email->print_debugger(); 
Reply

#3
Updating for the record.

The mail server in question was a locked down MAPI server, no listening SMTP. The solution was commenting out the SMTP auth and allowing the I.P. of the sending script to relay.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.