php - 从 symfony 中的 swift mailer 发送时防止电子邮件中的标题

标签 php email symfony swiftmailer

我正在使用 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

最佳答案

你需要使用 renderView() 而不是 render()

renderView() 返回 View 的内容。

render() 返回响应对象。

作为 docs

关于php - 从 symfony 中的 swift mailer 发送时防止电子邮件中的标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24679598/

相关文章:

javascript - 从 View 到 Controller 获取选中的复选框列表数据

php - 基于命令行、按计划的 Azure WebJobs - 不再可能了吗?

php - Symfony 2.4 从 Controller 执行命令

mysql - symfony2 : An exception occured in driver: SQLSTATE[HY000] [1049] 中的 MySQL (PDO) 错误

php - 学说 : Can I flush only one class of entities?

javascript - 表单提交期间的 php 确认消息

C# 和 Lotus Notes

rest - Outlook.com REST API - 在没有动态登录的情况下获取 token

android - 在电子邮件 : android. 中发送多个附件 intent.extra.STREAM 预期 Parcelable

apache - Apache 中的 RewriteRule 与 Symfony2 不删除 app.php