
4,380 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi I asked this question in Nov.
Re-asking to see if anyone can provide a work around
Default Mail App - is Outlook
C# UWP
I need to send an email with attachments from a C# UWP App. Outlook opens with all the info but not the ATTACHMENTS.
thank you
private async Task ComposeEmail()
{
var emailMessage = GetEmailMessage();
emailMessage.Body = "Please find attached zip file ";
emailMessage.Subject = "Reports for " + SFiles.PtRptList.PtName;
if (ReportZipFile != null)
{
StorageFile attachemntFile = await StorageFile.GetFileFromPathAsync(ReportZipFile);
var stream = Windows.Storage.Streams.RandomAccessStreamReference.CreateFromFile(attachemntFile);
// var attachment = new Windows.ApplicationModel.Email.EmailAttachment(
// attachemntFile.Name,
// stream);
// emailMessage.Attachments.Add(attachment);
emailMessage.SetBodyStream(EmailMessageBodyKind.Html, stream);
}
await Windows.ApplicationModel.Email.EmailManager.ShowComposeNewEmailAsync(emailMessage);
}
Hi, i've the same issue, did you found a solution ?