Welcome Guest, Not a member yet? Register   Sign In
html emails using email class
#25

[eluser]JHackamack[/eluser]
Downloaded a fresh CI install Copied your code (except put it in the welcome controller as i was too lazy) And received the HTML Email using the Apple Mail Program.
All I changed was the config.php file to point to localhost
Welcome.php
Code:
<?php

class Welcome extends Controller {

    function Welcome()
    {
        parent::Controller();    
    }
    
    function index()
    {
        $this->load->library('parser');
        $this->load->library('email');
        
        $config['mailtype'] = 'html';

        $this->email->initialize($config);
        
        $this->email->from('[email protected]', 'Support name');
        $this->email->to('Hidden for Anonimity');

        $this->email->subject('Email Test');
        $message = '<html>';
...snip for length...
        $message .= '</html>';
        $this->email->message($message);

        $this->email->send();

        echo $this->email->print_debugger();
    }
}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */
Debugger
Code:
User-Agent: CodeIgniter
Date: Thu, 14 Jan 2010 17:34:36 -0800
From: "Support name"
Return-Path:
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_4b4fc62cf352b"

This is a multi-part message in MIME format.
Your email application may not support this format.

--B_ALT_4b4fc62cf352b
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

{site_name} | Forgot Password NotificationDear, {alias}!You recently went
through the password recovery process at {site_name}. The recovery was
successful.Your password is: {password}If you feel you are receiving this
email in error, please contact {support_email}.Click here to go to the login
page.All the best,{site_name} Team.


--B_ALT_4b4fc62cf352b
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
=?utf-8?Q?Email_Test?=
&lt;html&gt;&lt;head>&lt;meta http-equiv=3D"Content-Type" content=3D"text/html; charset=
=3Dutf-8" /&gt;&lt;title>{site_name} | Forgot Password Notification&lt;/title&gt;&lt;/head=
>&lt;body style=3D"background-color:#f7f7f7;"&gt;&lt;div style=3D"border:5px solid #=
ffffff; width:642px; background-color:#ffffff;"><div style=3D"height:16px; =
padding:6px 4px 4px 8px; color:#016599; font-family:Arial, Sans-serif; widt=
h:630px; font-size:11px; font-weight:bold; background-color:#e3f4f8;">{site=
_name} | Forgot Password Notification</div><div style=3D"border:1px solid #=
e3f4f8; background-color:#ffffff; padding:20px; font-family:Arial, Sans-ser=
if; font-size:13px; width:600px;"><p style=3D"padding:0; margin:0;"><span s=
tyle=3D"font-size:19px;">Dear, {alias}!</span><br /><br />You recently went=
through the password recovery process at {site_name}. The recovery was suc=
cessful.<br /><br /><div style=3D"width:98%; height:23px; padding:8px 0 4px=
2%; background-color:#f6f6f6; border:1px solid #eeeeee; border-width:1px 1=
px 4px 1px; margin:12px 0;"><span style=3D"font-weight:bold;">Your password=
is:</span> {password}</div>If you feel you are receiving this email in err=
or, please contact {support_email}.<br /><br /><div style=3D"width:98%; hei=
ght:23px; padding:8px 0 4px 2%; background-color:#f6f6f6; border-top:1px so=
lid #eeeeee; border-bottom:1px solid #eeeeee; margin:12px 0;"><a >Click here</a> to go to the log=
in page.<br /></div><br /><br />All the best,<br /><br /><span style=3D"fon=
t-weight:bold;">{site_name} Team.</span></p></div></div>&lt;/body&gt;&lt;/html>

--B_ALT_4b4fc62cf352b--


Messages In This Thread
html emails using email class - by El Forum - 01-10-2010, 05:06 PM
html emails using email class - by El Forum - 01-10-2010, 05:25 PM
html emails using email class - by El Forum - 01-10-2010, 08:56 PM
html emails using email class - by El Forum - 01-10-2010, 09:04 PM
html emails using email class - by El Forum - 01-11-2010, 02:58 PM
html emails using email class - by El Forum - 01-11-2010, 03:19 PM
html emails using email class - by El Forum - 01-11-2010, 03:46 PM
html emails using email class - by El Forum - 01-11-2010, 03:49 PM
html emails using email class - by El Forum - 01-11-2010, 03:51 PM
html emails using email class - by El Forum - 01-11-2010, 04:04 PM
html emails using email class - by El Forum - 01-11-2010, 04:09 PM
html emails using email class - by El Forum - 01-11-2010, 04:10 PM
html emails using email class - by El Forum - 01-11-2010, 04:13 PM
html emails using email class - by El Forum - 01-11-2010, 04:15 PM
html emails using email class - by El Forum - 01-11-2010, 04:22 PM
html emails using email class - by El Forum - 01-11-2010, 04:25 PM
html emails using email class - by El Forum - 01-11-2010, 04:27 PM
html emails using email class - by El Forum - 01-11-2010, 04:33 PM
html emails using email class - by El Forum - 01-13-2010, 07:50 PM
html emails using email class - by El Forum - 01-13-2010, 07:51 PM
html emails using email class - by El Forum - 01-13-2010, 07:52 PM
html emails using email class - by El Forum - 01-14-2010, 04:10 PM
html emails using email class - by El Forum - 01-14-2010, 04:26 PM
html emails using email class - by El Forum - 01-14-2010, 07:18 PM
html emails using email class - by El Forum - 01-14-2010, 07:38 PM
html emails using email class - by El Forum - 01-14-2010, 08:18 PM
html emails using email class - by El Forum - 01-14-2010, 09:34 PM
html emails using email class - by El Forum - 01-14-2010, 10:17 PM
html emails using email class - by El Forum - 01-14-2010, 10:30 PM
html emails using email class - by El Forum - 10-13-2010, 11:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB