Welcome Guest, Not a member yet? Register   Sign In
Can't style the emails!
#1

[eluser]behnampmdg3[/eluser]
Hello;

The code works fine but it shows all the html tags as the tags and not rendered! In other words instead of applyimg the style it shows the style!
I have set the $config['mailtype'] to html but my emails appear like this:
Code:
<div  background-color:#1D1D1D; padding:5px; font-family: Helvetica Neue; font-size:12px;">
Some title
Behnam
</div>
What am I doing wrong? Thank you.

Code:
$this->email->from('[email protected]', 'Flter.com');
    $this->email->to('[email protected]');
    $this->email->subject('Welcome to Flater');
    $this->smarty->assign("message", 'Your place has been successfully added to the listings.');
    $output = $this->smarty->fetch('email_new_ad_view.tpl');
    $output = str_replace("#title#","Some title", $output);
    $output = str_replace("#name#", "Behnam", $output);
    $this->email->message($output);  
    $config['mailtype'] = 'html';
    $this->email->send();
    echo $this->email->print_debugger();
#2

[eluser]Otemu[/eluser]
You have forgot to add inline style to the html, well I thought that was the issue but seems the forum filters the style tag element out.
#3

[eluser]Aken[/eluser]
You need to pass the $config array to the email class. You're defining the array locally in your method, then not doing anything with it.




Theme © iAndrew 2016 - Forum software by © MyBB