/// <summary> /// Appends the message to the given mailbox. /// </summary> /// <remarks>The mailbox's sourceclient has to be connected.</remarks> /// <param name="imapMailbox">The mailbox the message has to be appended to.</param> /// <example> /// <code> /// C# /// ///Message message = new Message(); ///message.From = new Address("*****@*****.**","John Doe"); ///message.To.Add("*****@*****.**","Mike Johns"); ///message.Subject = "hey!"; ///message.Attachments.Add("C:\\myfile.doc"); ///message.BodyHtml.Text = "As promised, the requested document.<br /><br />Regards,<br>John."; /// ///Imap4Client imap = new Imap4Client(); ///imap.Connect("mail.myhost.com",8505); ///Mailbox inbox = imap.SelectMailbox("inbox"); /// ///message.Append(inbox); /// ///imap.Close(); ///imap.Disconnect(); /// /// VB.NET /// ///Dim message As New Message ///message.From = new Address("*****@*****.**","John Doe") ///message.To.Add("*****@*****.**","Mike Johns") ///message.Subject = "hey!" ///message.Attachments.Add("C:\myfile.doc") ///message.BodyHtml.Text = "As promised, the requested document.<br /><br />Regards,<br>John." /// ///Dim imap As New Imap4Client ///imap.Connect("mail.myhost.com",8505) ///Dim inbox As Mailbox = imap.SelectMailbox("inbox") /// ///message.Append(inbox) /// ///imap.Close() ///imap.Disconnect() /// /// JScript.NET /// ///var message:Message = new Message(); ///message.From = new Address("*****@*****.**","John Doe") ///message.To.Add("*****@*****.**","Mike Johns"); ///message.Subject = "hey!"; ///message.Attachments.Add("C:\\myfile.doc"); ///message.BodyHtml.Text = "As promised, the requested document.<br /><br />Regards,<br>John." /// ///var imap:Imap4Client = new Imap4Client(); ///imap.Connect("mail.myhost.com",8505); ///var inbox:Mailbox = imap.SelectMailbox("inbox"); /// ///message.Append(inbox); /// ///imap.Close(); ///imap.Disconnect(); /// </code> /// </example> public void Append(IMailbox imapMailbox) { imapMailbox.Append(this.ToString()); }