locked
Share contract , HTML with Image RRS feed

  • Question

  • We implemented email functionality using share contract where for the formatting we are using HTML.

    Please help us how we can share the image with the Formatted html content.

    We are able to send Formatted html content but failing to insert image.

                                                 

    StorageFile filenME = null;

                requestData.SetHtmlFormat(HtmlFormatHelper.CreateHtmlFormat(emailText));
                try
                {

                    filenME = await StorageFile.GetFileFromPathAsync("C:\\Users\\admin\\Pictures\\a.png");
                }
                catch (Exception ex)
                {

                    string str = "";


                }
                request.Data.ResourceMap["C:\\Users\\admin\\Pictures\\a.png"] = Windows.Storage.Streams.RandomAccessStreamReference.CreateFromFile(filenME);
      request.Data = requestData;

    throwing an exception

    Regard's

    Gopalakrishna M

    Thursday, November 28, 2013 4:05 PM

Answers

  • Hi Gopalakrishna,

    Can you tell us what the exception message is? It should give you some useful information.

    Your code looks correct as same as the sample from documentation. Take a look at the  sample from MSDN code center to see if it can help you, and post your error message if possible for a further analysis.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, November 29, 2013 1:39 AM
    Moderator