Cannot send HTML Emails
Posted
by
Zen Savona
on Stack Overflow
See other posts from Stack Overflow
or by Zen Savona
Published on 2011-01-10T01:29:35Z
Indexed on
2011/01/10
3:53 UTC
Read the original article
Hit count: 251
Well I'm trying to send a HTML email using gmail smtp from CI, and it seems to reject my emails when they have any amount of tables. No error is given, they just do not appear in my inbox.
If I send an email with light HTML and no tables, they go through. Anyone have any insight?
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => '--------',
'mailtype' => 'html',
'charset' => 'iso-8859-1'
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('myEmail', 'myName');
$this->email->to($this->input->post('email'));
$this->email->subject('mySubject');
$msg = $this->load->view('partials/email', '', true);
$this->email->message($msg);
$this->email->send();`
© Stack Overflow or respective owner