简体   繁体   English

从Symfony中的Swift Mailer发送邮件时阻止邮件头

[英]Prevent header from email when sending from swift mailer in symfony

Am using swift mailer to send email.It is working fine but in email it is sending the header information.How can I prevent it to send header information in email.It is like: 我正在使用swift mailer发送电子邮件。它工作正常,但在电子邮件中正在发送标头信息。如何防止它在电子邮件中发送标头信息,就像:

 HTTP/1.0 200 OK Cache-Control: no-cache Date: Thu, 10 Jul 2014 14:42:58 GMT
 Hello User

 Here is your email content

you need to use renderView() instead of render() 您需要使用renderView()而不是render()

renderView() returns the content of the view. renderView()返回视图的内容。

render() returns the Responseobject. render()返回Response对象。

as the docs says 正如文档所说

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM