CodeIgniter Forums

Full Version: I can not send HTML email with email class
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Alenazi[/eluser]
I tried to send html email with email class but it did not work. The email was received as plain text with html tags not interpreted

My code looks like this
Code:
$config['protocol'] = 'smtp';
        $config['mailtpye'] = 'html';
        $config['smtp_host'] = 'smtp.al3gari.com';
        $config['smtp_user'] = '[email protected]';
        $config['smtp_pass'] = '******************';
        $config['smtp_port'] = '25';
        $config['newline'] = "\r\n";
        $this->CI->load->library('email',$config);

El Forum

[eluser]density5[/eluser]
[quote author="Alenazi" date="1249966175"]I tried to send html email with email class but it did not work. The email was received as plain text with html tags not interpreted

My code looks like this
Code:
$config['protocol'] = 'smtp';
        $config['mailtpye'] = 'html';
        $config['smtp_host'] = 'smtp.al3gari.com';
        $config['smtp_user'] = '[email protected]';
        $config['smtp_pass'] = '******************';
        $config['smtp_port'] = '25';
        $config['newline'] = "\r\n";
        $this->CI->load->library('email',$config);
[/quote]

looks wrong -> $config['mailtpye'] = 'html';
Shoud it not be -> $config['mailtype'] = 'html';