public static void StoreMessage(string mailbox, string password, string folder, byte[] messageBytes) { using (var imapClient = new IMAP_Client()) { imapClient.Connect(Settings.Default.IMAPHost, Convert.ToInt32(Settings.Default.IMAPPort)); imapClient.Authenticate(mailbox, password); imapClient.SelectFolder(Settings.Default.IMAPSourceFolder); imapClient.StoreMessage(folder, messageBytes); } }