通过imap发送邮件 [英] get sent mails via imap

查看:208
本文介绍了通过imap发送邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何使用 AE.NET邮件图书馆将所有发送的邮件发送给特定用户?

Does someone know how I can get all sent mails to specific user using AE.NET mail library?

我已经尝试过这样的事情:

I've tried something like this:

imap = new ImapClient(imapMailServer, username, password, ImapClient.AuthMethods.Login, imapMailPort, imapUseSSL);

if (imap.IsConnected)
{
    imap.SelectMailbox("INBOX");

    var msg = imap.SearchMessages(SearchCondition.To("examplemail@gmail.com"));
}

但没有任何成功(msg收集为空)...

But without any success (msg collection is empty)...

编辑(解决方案)

我不得不选择发送的文件夹而不是收件箱。因为我使用Gmail,Gmail的发送邮件文件夹被命名为[Gmail] /已发邮件。所以它必须是:

I had to select sent folder instead of inbox. Because I am using gmail, Gmail's sent mail folder is named "[Gmail]/Sent Mail". So it has to be:

imap.SelectMailbox("[Gmail]/Sent Mail");


推荐答案

您是否在寻找您发送的消息?在这种情况下,它们可能位于Google的Sent文件夹中,这是 [Gmail] / Sent Mail

Are you looking for message you've sent? In that case, they're likely in the Sent folder, which is [Gmail]/Sent Mail on Google.

这篇关于通过imap发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆