Getting the message body |
Upon retrieving an email message from a mailbox you can get the email body using the GetBody method.
Example
[C#] myImap.Connect(); IEnumerator e = myImap.GetMessages(); while(e.MoveNext()) { EmailMessage message = (EmailMessage)e.Current; // write out message body Console.Writeline(message.GetBody()); }
[Visual Basic] myImap.Connect() Dim e As IEnumerator = myImap.GetMessages() Dim message As EmailMessage = Nothing While (e.MoveNext()) message = e.Current ' write out message body Console.WriteLine(message.GetBody()) End While
|