So, I am even more confused then I was before, using the following code on a fresh install all the emails send fine.
PHP Code:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index() {
$this->load->library('email');
$config = array(
'mailtype' => 'html',
'useragent' => 'Codeigniter Test',
'protocol' => 'smtp',
'smtp_host' => '173.194.67.108',
'smtp_port' => 587,
'smtp_user' => '[email protected]',
'smtp_pass' => 'mypassword',
'smtp_crypto'=>'tls'
);
$this->email->initialize($config);
$this->email->set_newline("\r\n");
$emails = array(
'[email protected]',
'[email protected]',
'[email protected]'
);
foreach($emails as $to) {
$this->email->to($to);
$this->email->from('[email protected]', 'My Name');
$this->email->subject('Codeigniter Email Test');
$this->email->message( $this->load->view('welcome_message',array(),true) );
$result = $this->email->send();
}
}
}