Click here to Skip to main content
14,836,169 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using imap to save sent mail into sent folder, but is in unread form I want to change the status.

What I have tried:

using (var Iclient = new ImapClient(new ProtocolLogger("smtp.log")))
{

    Iclient.ConnectAsync("", 993, true);
    Iclient.Authenticate(email.Trim(), pass.Trim());
    var sent = Iclient.GetFolder("Sent");
    sent.Append(message);
}
Posted
Updated 6-Jan-21 3:13am

1 solution

Simple:
C#
using (var client = new ImapClient(new ProtocolLogger("smtp.log"))
{
    await client.ConnectAsync(IMAP_HOST, 993, true);
    await client.AuthenticateAsync(email, pass);
    
    var sentItems = client.GetFolder(SpecialFolder.Sent);
    await sentItems.AppendAsync(message, MessageFlags.Seen);
}
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900