Click here to Skip to main content
15,888,341 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
C#
DataRequest request = args.Request;
                   DataRequestDeferral deferral = request.GetDeferral();

                   request.Data.Properties.Title = Constants.EMAIL_SUBJECT;
                   request.Data.SetText(Constants.EMAIL_TEXT);
                   var 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.
Posted
Updated 13-Mar-13 3:11am
v4
Comments
FrankLavigne 14-Mar-13 17:33pm    
Have you tried using the Share Target Sample App http://code.msdn.microsoft.com/windowsapps/Sharing-Content-Target-App-e2689782 to troubleshoot?

Thanks,
Frank
http://bit.ly/30ToLaunchWin8
mayankkarki 15-Mar-13 1:26am    
Thanks.My app is source not target.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900