我需要的Windows Phone 8或其他替代郵件客戶端庫(IMAP和SMTP)(如TcpClient的,SslClient在Windows 8中,但我不Windows Phone中獲得8) 。我谷歌很多。請讓我知道任何圖書館或文章/教程實施IMAP和SMTP郵件客戶端在Windows Phone 8C#IMAP SMTP郵件客戶端的Windows Phone 8的
在此先感謝。
我需要的Windows Phone 8或其他替代郵件客戶端庫(IMAP和SMTP)(如TcpClient的,SslClient在Windows 8中,但我不Windows Phone中獲得8) 。我谷歌很多。請讓我知道任何圖書館或文章/教程實施IMAP和SMTP郵件客戶端在Windows Phone 8C#IMAP SMTP郵件客戶端的Windows Phone 8的
在此先感謝。
您可以sockets in Windows Phone 8工作。顯然有一個新的Windows.Networking.Sockets API可以嘗試使用,但基於System.Net.Sockets
的經典應用仍然可以使用 - here's an example。
你最好還是要執行IMAP和SMTP自己雖然,除非一些功能已經存在,我們還沒有發現。
我發現SMTP client for WinRT 這對我來說工作
我發現這個link爲Windows手機8.1
非常有用請在數據模型文件夾像MailManager一類,並在頂部添加此行的代碼你類using Limilabs.Mail;
也將此Mail.dll
庫添加到您的項目。 Read more
StorageFile imageFile = ...;
StorageFile attachmentFile = ...;
MailBuilder builder = new MailBuilder();
builder.Html = @"Html with an image: <img src="" cid:[email protected]@example.com""="">";
MimeData image = await builder.AddVisual(imageFile);
image.ContentId = "[email protected]";
await builder.AddAttachment(attachmentFile);
builder.To.Add(new MailBox("[email protected]"));
builder.From.Add(new MailBox("[email protected]"));
builder.Subject = "Subject";
IMail email = builder.Create();
using(Smtp smtp = new Smtp())
{
await smtp.Connect("smtp.server.com"); // or ConnectSSL for SSL
await smtp.UseBestLoginAsync("user", "password");
await smtp.SendMessageAsync(email);
await smtp.CloseAsync();
}
不[SmtpClient(http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient(V = vs.110)的.aspx)在Windows上運行電話8?至於IMAP,還有一些圖書館......不知道它們有多好。 – Gigi
不,「SmtpClient」在Windows Phone 8中不可用。我已經試過了。而對於IMAP有一個[教程](http://code.msdn.microsoft.com/windowsdesktop/Simple-IMAP-CLIENT-b249d2e6)實現與'TcpClient'和'SslClient',但是這兩個TcpClient的和SslClient IMAP在Windows Phone中也不可用。而不是找到任何額外的庫。 –
WP8甚至沒有TcpClient?那麼我想你會需要使用套接字,假設它們可用。自從我編寫自己的IMAP庫以來,我非常感興趣學習WP8支持的內容。 – Gigi