如何在Windows 8.1通用应用程序

时间:2015-05-16 09:01:13

标签: c# xaml windows-8.1

如何在Windows通用应用程序(Windows Phone 8.1和Windows 8.1)中发送带附件的电子邮件?

1 个答案:

答案 0 :(得分:0)

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);