Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Email 如何为Gmail设置电子邮件格式?_Email_Codeigniter_Formatting_Gmail_Html Email - Fatal编程技术网

Email 如何为Gmail设置电子邮件格式?

Email 如何为Gmail设置电子邮件格式?,email,codeigniter,formatting,gmail,html-email,Email,Codeigniter,Formatting,Gmail,Html Email,我正在使用的内置库发送电子邮件。我所要做的只是发送一个粗体字符串,但它不是呈现标记,而是打印它们。我所拥有的: <html> <head> </head> <body> <b>Donkey</b> </body> </html> 驴 也就是说,一个字符对一个字符,我收到的电子邮件。为什么标签不能呈现?您试过了吗 <span style='font-weight: bold'&g

我正在使用的内置库发送电子邮件。我所要做的只是发送一个粗体字符串,但它不是呈现标记,而是打印它们。我所拥有的:

<html>
 <head>
 </head>
 <body>
 <b>Donkey</b>
 </body>
 </html>
也就是说,一个字符对一个字符,我收到的电子邮件。为什么标签不能呈现?

您试过了吗

<span style='font-weight: bold'>My bold text</span>
我的粗体文本

另一个粗体标记
?

我们使用这些,它们都适用于Gmail。

你试过了吗

<span style='font-weight: bold'>My bold text</span>
我的粗体文本

另一个粗体标记
?

我们使用这些,它们都适用于Gmail。

来自:

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

来自:


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

这是否只会导致Gmail出现问题?如果您在Outlook或Yahoo!邮件,是否正确呈现?可能与发送mime类型有关。。。检查codeigniter库的api,寻找切换发送html版本的方法。这只会导致Gmail出现问题吗?如果您在Outlook或Yahoo!邮件,是否正确呈现?可能与发送mime类型有关。。。检查codeigniter库的api以了解切换发送html版本的方法。
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859-1';
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';

$this->email->initialize($config);