i am developing an metro application , where i have requirement :-
where i need to send some information from my app to end users through an email, i am generating the information or content for that email programatically through code.
Firstly thing i worked on is launching mailto app in my application in this way :-
using Windows.System;
//starts the default mail app with a subject, cc, bcc, and body
Launcher.LaunchUriAsync(new Uri("mailto:[email protected]?subject=Code Request&[email protected]&[email protected]&body=Hi!"));
Then i discovered that i cannot attach attachements to this mail app programatically through code if you are launching the mail app in this way.
Secondly, i worked on share contract where i can share content generated from my app to other apps (like mailto app also...)
and i was able to share my content successfully which means :-
using this i am able to attach a file(which i generated through code) to mailto app and if i specify the mail address and send it it works fine and delivered successfully )
But now i discovered that i cannot set the subject or body of the mail app to which i am sharing content , if i am using an share contract to share files.
so my doubt is :-
1) first of all , is there any way that i can set the subject or body of the mail app to which i am sharing content , if i am using an share contract to share files ??
2)Am i missing any other alternative / are there any other possible ways of sending email using metro app ??
3)if not , what is the workaround through which i can achieve my goal ( sending an email through which i can attach file programatically through code and have a body , subject set to it )
Thanks in advance.