【发布时间】:2013-12-04 15:38:46
【问题描述】:
有没有办法让 swift mail 将消息放在草稿文件夹中,而不仅仅是发送。麻烦似乎是使用 gmail 的 smtp 实例。我已经像这样尝试了 imap_append:
$authhost="{smtp.gmail.com:993/imap/ssl}INBOX.Drafts";
$user="asdf@asdfasd.com";
$pass="asdkjasdf";
$mbox=imap_open( $authhost, $user, $pass);
//after creating the message $msg then using imap_append
imap_append($mbox,$authhost,$msg, "\\Draft");
问题在于,无论我如何修改 $authhost,我都会得到一个无法打开的流。我错过了什么还是有更好的选择?谢谢
【问题讨论】:
-
您还需要使用 imap.gmail.com。 SMTP用于发送邮件,imap用于访问邮箱。
标签: imap swiftmailer