如何在Windows 8.1通用应用程序中发送带有附件的电子邮件
本文关键字:电子邮件 Windows 1通 应用程序 | 更新日期: 2023-09-27 17:49:17
如何在Windows通用应用程序(Windows Phone 8.1和Windows 8.1)中发送带有附件的电子邮件?
EmailMessage objEmail = new EmailMessage();
objEmail.Subject = "Abundantcode Article";
var localAppFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
var fileHandle = await localAppFolder.CreateFileAsync("AbundantcodeData.txt", Windows.Storage.CreationCollisionOption.ReplaceExisting);
objEmail.Attachments.Add(new EmailAttachment(fileHandle.Name, fileHandle));
await EmailManager.ShowComposeNewEmailAsync(objEmail);