locked
How to include company logo in email contents

    Question

  • I face a problem to include logo/icon inside email contents. Below is a part of my codes to include it:-

    DataRequest^ request = e->Request;
    request->Data->Properties->Title = "Company Logo";
    request->Data->Properties->Description = "Email";
    String^ contents= "<html><body><img src='D:/images/abc.png' alt='TIB logo' height='100' width='100' /><br><br></body></html>"
    
    request->Data->SetText(contents);
    request->Data->SetHtmlFormat(Windows::ApplicationModel::DataTransfer::HtmlFormatHelper::CreateHtmlFormat(contents));
    It is not work for me and the logocannot be show. What is my problem? 

    Monday, February 23, 2015 2:20 AM

Answers

  • Hi Tonberry89,

    To insert yout logo to the email there are several options.

    1, Upload your image to somewhere on the Internet and then use that address instead of the local address.

    2, Encode your image as base64 and attached with the html code.

    3, Use ResourceMap | resourceMap property to convert image to a stream and attach with the content.

    Besides, you wont have access to D disk as Windows Store App does not allow to access that folder: File access and permissions

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, February 23, 2015 7:27 AM
    Moderator

All replies

  • Hi Tonberry89,

    To insert yout logo to the email there are several options.

    1, Upload your image to somewhere on the Internet and then use that address instead of the local address.

    2, Encode your image as base64 and attached with the html code.

    3, Use ResourceMap | resourceMap property to convert image to a stream and attach with the content.

    Besides, you wont have access to D disk as Windows Store App does not allow to access that folder: File access and permissions

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, February 23, 2015 7:27 AM
    Moderator
  • Thanks for your advise. Method number 2 I have try before and it is also not work. I will try method 1 and 3.
    Monday, February 23, 2015 8:59 AM
  • Hi Tonberry89,

    If you send the email with HTML format, the first solution will definitely work, I believe the third one should always work, include your image in the app package or using File Picker to get the correct image from D disk.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, February 27, 2015 1:27 AM
    Moderator