Save email on gmail.com to send it later

I can send email , but how to save without send, and find it in draft folder?
account gmail of  mail.google.com server not local host or outlook.
thank for you help!

Hi,

Thank you for writing to Aspose Support team.

Please use the following sample code to append a message to Gmail’s drafts folder and let us know if you need further assistance in this regard.

Sample Code:

ImapClient client = new ImapClient(“imap.gmail.com”, 993, “from@domain.com”, “to@domain.com”);

client.SecurityOptions = SecurityOptions.Auto;

ImapFolderInfoCollection folders = client.ListFolders("[Gmail]");

foreach (ImapFolderInfo fi in folders)

{

if (fi.Name.Contains(“Drafts”))

{

MailMessage eml = new MailMessage(“from@gmail.com”, “to@aspose.com”, “Subject”, “Body”);

eml.IsDraft = true;

client.AppendMessage(fi.Name, eml);

}

}
perfect! thank you!!! :))

Hi,


You are welcome and please feel free to write to us if you have any further query related to the API.