Welcome Guest, Not a member yet? Register   Sign In
problem sending html email
#1

[eluser]PermanaJ[/eluser]
I got problem when trying to sending HTML email. The email was sent but I cannot read the email. The result is like picture below

http://i264.photobucket.com/albums/ii162...rshoot.jpg

I have a view for HTML email application/views/mail/mailtest.php
Code:
<html>
<body>
<STYLE>
body{
    background-color:#f9f9f9;
    font-family:12px;
}
h1 {
    color: #444;
    background-color: transparent;
    border-bottom: 1px solid #D0D0D0;
    font-size: 16px;
    font-weight: bold;
}
</STYLE>
<h1>Hello, &lt;?php echo $name; ?&gt;</h1>
<p>How are you ?</p>
</p>
&lt;/body&gt;
&lt;/html&gt;

and i have this controller application/controller/test.php
Code:
&lt;?php
class Test extends Controller{
    public function __construct() {
        parent::Controller();
    }

    public function testemail() {
        $this->load->library('email');

        $vars ['name'] = 'Tony Stark';
        $body = $this->load->view('mail/mailtest', $vars, true);

        $config['mailtype'] = 'html';

        $this->email->initialize($config);
        $this->email->from('[email protected]', 'Permana');
        $this->email->to('devtest1@localhost');
        $this->email->subject('Email test');
        $this->email->message($body);

        $this->email->send();
    }
}

?&gt;


Messages In This Thread
problem sending html email - by El Forum - 04-09-2009, 10:59 PM
problem sending html email - by El Forum - 04-09-2009, 11:13 PM
problem sending html email - by El Forum - 04-10-2009, 05:37 AM
problem sending html email - by El Forum - 04-14-2009, 07:56 PM
problem sending html email - by El Forum - 05-10-2009, 10:45 PM
problem sending html email - by El Forum - 05-10-2009, 10:55 PM
problem sending html email - by El Forum - 05-10-2009, 11:14 PM
problem sending html email - by El Forum - 05-10-2009, 11:20 PM
problem sending html email - by El Forum - 05-20-2009, 05:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB