HI , sorry for english i try to send pec from my webapp with codeigniter 3 :
PHP Code:
$this->load->library('email');
$config['protocol'] = 'smtp';
$config['mailPath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordWrap'] = true;
$config['smtp_crypto'] = 'ssl';
$config['mailtype'] = 'html';
$config['SMTPHost'] = 'smtps.pec.aruba.it';
$config['SMTPUser'] = '[email protected]';
$config['SMTPPass'] = 'xxxxxxxx';
$config['SMTPPort'] = 465;
$this->email->initialize($config);
$this->email->from('[email protected]', '[email protected]');
$this->email->to('[email protected]');
$this->email->subject('Prove Pec Stefano ' );
$message = '
<html>
<head>
<title></title>
</head>
<body>
<p>Prova composizione pec <p>
</body>
</html>';
$this->email->message($message);
if ($this->email->send()) {
echo 'Inviata';
//return TRUE;
}else{
//return $email->printDebugger();
echo $this->email->print_debugger();
}
This is the error :
Code:
You did not specify a SMTP hostname.
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
Wath can i do ?