我想使用 Swift 从我的应用程序发送一封带有 HTML 正文的自动生成的电子邮件。
这是我当前的代码:
$message = Swift_Message::newInstance()
->setFrom(array('dummy1@test.com' => 'John Doe'))
->setTo('dymmy2@test.com')
->setSubject('some subject');
$message->setBody($this->getPartial('global/mail_partial'));
$this->getMailer()->send($message);
我已经尝试使用一些特定的 Swift 方法更改电子邮件的标题内容类型,但它不起作用。