如何在Windows通用应用程序(Windows Phone 8.1和Windows 8.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);