Hello,
I have issue setting up Zoho mail client to send e-mail from CodeIgniter.
Domain is verified already and all required steps in configuration are done already.
Here is code:
$config['smtp_host'] = 'ssl://smtp.zoho.com';
$config['smtp_port'] = '465';
$config['smtp_user'] = 'Forinspection App';
$config['smtp_pass'] = '<mypass>';
$config['smtp_crypto'] = 'ssl';
$config['$smtp_keepalive'] = TRUE;
$config['charset'] = 'iso-8859-1';
$config['mailtype'] = 'html'; // or html
//$config['validation'] = TRUE; // bool whether to validate email or not
$this->load->library('email');
$this->email->initialize($config);
$this->email->from('noreply@forinspection.com', 'Forinspection');
$this->email->to('hajdarevic89@gmail.com');
$this->email->subject('No reply - Welcome to Forinspection');
$this->email->message("Dear this is only a test");
$this->email->send();
echo $this->email->print_debugger(); here is error: The following SMTP error was encountered: 0 php_network_getaddresses: getaddrinfo failed: Name or service not known<br />Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.<br /><pre>User-Agent: CodeIgniter Date: Sat, 8 Oct 2016 16:42:46 -0400 From: "Forinspection" <noreply@forinspection.com> Return-Path: <noreply@forinspection.com> To: hajdarevic89@gmail.com Subject: =?iso-8859-1?Q?=4E=6F=20=72=65=70=6C=79=20=2D=20=57=65=6C=63=6F=6D=65=20?= =?iso-8859-1?Q?=74=6F=20=46=6F=72=69=6E=73=70=65=63=74=69=6F=6E?= Reply-To: "noreply@forinspection.com" <noreply@forinspection.com> X-Sender: noreply@forinspection.com X-Mailer: CodeIgniter X-Priority: 3 (Normal) Message-ID: <57f95a464d1d3@forinspection.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="B_ALT_57f95a464d27a" This is a multi-part message in MIME format. Your email application may not support this format. --B_ALT_57f95a464d27a Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Dear this is only a test --B_ALT_57f95a464d27a Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Dear this is only a test --B_ALT_57f95a464d27a--</pre>email debug