Php 通过switmailor在移动浏览器中获取HTML标记

Php 通过switmailor在移动浏览器中获取HTML标记,php,html,swiftmailer,Php,Html,Swiftmailer,我们已经制作了一个表格,我们正在使用swiftmailor图书馆通过电子邮件发送其数据 如果用户从桌面浏览器填充数据,则数据显示格式正确,没有HTML标记,但如果用户从移动浏览器填充数据,则HTML标记将出现在电子邮件中 你能告诉我这是手机浏览器还是迅捷的问题吗 我们正在使用标题: $headers = "From: " . 'XYZ' . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/h

我们已经制作了一个表格,我们正在使用swiftmailor图书馆通过电子邮件发送其数据

如果用户从桌面浏览器填充数据,则数据显示格式正确,没有HTML标记,但如果用户从移动浏览器填充数据,则HTML标记将出现在电子邮件中

你能告诉我这是手机浏览器还是迅捷的问题吗

我们正在使用标题:

$headers = "From: " . 'XYZ' . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
以及用快件寄信

$message = Swift_Message::newInstance('Enquiry FORM')
->setFrom(array('noreply@XYZ.com' => 'XYZ'))   
->setTo(array($sendTo))
->setBody($messageContent, 'text/html')  ;

  // Send the message
   $result = $mailer->send($message);
请建议应实施何种解决方案,以便两种浏览器都可以发送html格式。

使用此选项

setBody($this->renderView($messageContent), 'text/html');
而不是这个

setBody($messageContent, 'text/html')  ;
用这个

setBody($this->renderView($messageContent), 'text/html');
而不是这个

setBody($messageContent, 'text/html')  ;

它不起作用Abdulla,你有其他解决方案吗?它不起作用Abdulla,你有其他解决方案吗?