如何格式化Gmail的电子邮件?

Eth*_*han 1 email formatting gmail codeigniter html-email

我正在使用CodeIgniter的内置库发送电子邮件.我要做的就是发送一个粗体字符串,但不是渲染标签,而是打印它们.是)我有的:

<html>
 <head>
 </head>
 <body>
 <b>Donkey</b>
 </body>
 </html>
Run Code Online (Sandbox Code Playgroud)

也就是说,角色的角色,我正在收到的电子邮件.为什么标签不呈现?

Sea*_*ira 5

文档:

$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';

$this->email->initialize($config);
Run Code Online (Sandbox Code Playgroud)

CodeIgniter Email类默认发送文本电子邮件.除非您指定mailtype是HTML($config['mailtype'] = 'html';),否则您的html将作为文本发送出去.