+1 vote

I can send emails via SMTP through icloud and gmail, and they arrive, but unlike outlook they dont turn up in the sent mail folder. Am I doing something wrong?

by

1 Answer

0 votes
 
Best answer

Gmail puts emails sent via SMTP in sent folder automatically.

On other servers it depends and unfortunately there is no extension that allows to check that.

You can use IMAP and UploadMessage to upload message to sent folder after sending:

using (Imap imap = new Imap())
{
    imap.Connect("imap.server.com");     // or ConnectSSL for SSL
    imap.UseBestLogin("user", "password");

    FolderInfo sent = new CommonFolders(imap.GetFolders()).Sent;

    imap.UploadMessage(sent, email);

    imap.Close();
}

You can find entire sample here:
https://www.limilabs.com/blog/upload-email-to-sent-folder-after-sending

by (297k points)
...