1
votes

I am working on a metro app with c#. I want to share some attachment with subject and mail body to mailto application. I code like this

DataRequest request = args.Request;
DataRequestDeferral deferral = request.GetDeferral();
request.Data.Properties.Title = Constants.EMAIL_SUBJECT;
request.Data.SetText(Constants.EMAIL_TEXT);
smiFile = await Windows.Storage.ApplicationData.Current.LocalFolder.GetFileAsync(Constants.SMI_FILE);

List<IStorageItem> lstItems = new List<IStorageItem>();
lstItems.Add(smiFile);
if (lstItems.Count > 0)
{
    request.Data.SetStorageItems(lstItems);
}

deferral.Complete();

When I open mailto app in share charm it only shows attachment with blank subject and body. And in second scenario if I remove attachment then subject and body appears. Why this is happening I want complete mail to send.

1

1 Answers

1
votes

It's not possible because Mail app has limitation. I think Microsoft should update Mail app with that sharing capability. Check these also.

Share attachment and text from metro app (I think this is your thread :P)

How to set subject and message part in email with attachment while share charm usage ?