我正在使用 SwiftMailer for PHPswiftmailer.org
一切正常,但我想知道是否有一种方法可以将已发送的消息从 SwiftMailer 发送的邮件帐户添加到已发送的文件夹中?
就这样,祝你有美好的一天。
据开发人员称,swiftmailer 无法复制到“已发送”文件夹,因为它是邮件发送程序而不是邮箱管理器。
正如上面提到的github页面:
Swiftmailer 是一个发送电子邮件的库,而不是管理邮箱的库。所以,这确实超出了 Swiftmailer 的范围。
然而,来自 php.net 的某人发布了可能适合您的解决方案:
-
使用 SwiftMailer 通过 PHP 发送消息。
$message = Swift_Message::newInstance("Subject goes here");
// (then add from, to, body, attachments etc)
$result = $mailer->send($message);
-
当您在上面的步骤 1) 中构造消息时,将其保存到变量中,如下所示:
$msg = $message->toString();
// (this creates the full MIME message required for imap_append()!!
// After this you can call imap_append like this:
imap_append($imap_conn,$mail_box,$msg."\r\n","\\Seen");
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)