using (Imap imap = new Imap()) { imap.Connect("imap.gmail.com"); // or ConnectSSL imap.UseBestLogin("********@gmail.com", "*******"); imap.SelectInbox(); List<long> uids = imap.Search(Flag.Unseen); List<MessageInfo> infos = imap.GetMessageInfoByUID(uids); foreach (MessageInfo info in infos) { MessageBox.Show("Subject: " + info.Envelope.Subject); MessageBox.Show("From: " + info.Envelope.From); MessageBox.Show("To: " + info.Envelope.To); foreach (MimeStructure attachment in info.BodyStructure.Attachments) { MessageBox.Show(attachment.SafeFileName); } break; } imap.Close(); }
An attempt was made to access a socket in a way forbidden by its access permissions 74.125.24.108:143
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)