CodeIgniter Forums
Help with Email Class - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Help with Email Class (/showthread.php?tid=74625)



Help with Email Class - ajmeireles - 10-16-2019

Hi, community!

This is my first topic.

I have a problem, I'm try to send a email for some users of my system that is based on CI 3.1.11 and the source html of the email is displayed. This is the configurations that I use at this moment:

$config['protocol']    = 'sendmail';
$config['mailpath']    = '/usr/sbin/sendmail';
$config['charset']    = 'utf-8';
$config['mailtype']    = 'html';
$config['wordwrap']    = TRUE;
$config['smtp_host']  = '****';
$config['smtp_user']  = '****';
$config['smtp_pass']  = '****';
$config['smtp_port']  = '25';
$config['smtp_crypto'] = 'tls';

Test message:
<center>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td style="padding: 20px;" align="center" valign="top">
A
</td>
</tr>
<tr>
<td style="padding: 20px;" align="center" valign="top">
B
</td>
</tr>
</tbody>
</table>
</center>

But is displayed like it:
[Image: e9cc3f63ed.png]

How I can solve it? Thank you!


RE: Help with Email Class - mboufos - 10-17-2019

PHP Code:
$config['protocol']    'smtp';
$config['smtp_host']    '****';
$config['smtp_port']    '25';
$config['smtp_timeout'] = '7';
$config['smtp_user']    '*****';
$config['smtp_pass']    '****';
$config['charset']    'utf-8';
$config['newline']    "\r\n";
$config['mailtype'] = 'html';
$config['validation'] = FALSE;
$this->email->initialize($config); 
i use those settings with no problems !  check those and let me know