Swiftmail imap到草稿文件夹

时间:2013-12-04 02:09:19

标签: imap swiftmailer

有没有办法让swift邮件在草稿文件夹中放置一条消息,而不仅仅是发送。麻烦似乎是使用gt的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我得到一个无法打开的流。我错过了什么或者是否有更好的选择?感谢

1 个答案:

答案 0 :(得分:0)

您使用的是错误的文件夹名称。该名称不是Gmail中的INBOX.Drafts,而是[Gmail] /草稿。 INBOX.Drafts是例如Fastmail呼叫邮箱。

相关问题