cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KW001
Level: Powered On

Re: How To: Powerapp builds HTML to Office365.SendEmail w/ Inline image

@KickingApps - Appreciate your time here, I hope I am not wearing your patience thin!

 

I am working through the solution you provided and I'm running into some confusion.

 

  1. I uploaded the Logo image file into the media section of my PowerApp (filename "Logo").
  2. From there I had to adjust the syntax you provided in (1) to clear the error. It didn't like the First().

 

(1) - I got working

ClearCollect(
    colLogo, 
    Logo //this is my image from the media section
)

(2) - I verified the image from the media section was collected into the Collection and part of the gallery. Note: I had to change the image property to the below in order to get the image to display on the screen. Else it had an empty image box.

ThisItem.Url

(3) - The htmlbox is not reporting any syntax errors, however it's displaying completely empty... 

"<table>
  <tr>
      <td valign='Top'> 
        <img src=" & Image & " style=""max-width:100%;max-height:100%;""> // The "image" listed here is the object name from the gallery? If that is the case then it matches!
        </td>
        
  </tr>
</table>"

2019-10-25 13-20-21_Cortana.png

 

 

Again I appreciate you taking the time to assist me with this. It's such a silly thing to struggle with including an image, that's part of the available media in the app, in an outbound html email... Smiley Sad

KickingApps
Level 8

Re: How To: Powerapp builds HTML to Office365.SendEmail w/ Inline image

@KW001 - where is your image coming from - is it SharePoint? //Disregard - I see you are getting images from your media.  I'll do some digging and get back to you.

 

And no apologies necessary; I have had much help along the way and am happy to 'Pay it forward' where possible!

KickingApps
Level 8

Re: How To: Powerapp builds HTML to Office365.SendEmail w/ Inline image

@KW001 Can you save your logo in a SharePoint List - maybe an assets library? And collect from the SharePoint library?

KW001
Level: Powered On

Re: How To: Powerapp builds HTML to Office365.SendEmail w/ Inline image

@KickingApps 

I don't think I will have time to work on that today. My day is getting waaaay away from me. But will let you know by tomorrow sometime! Thank you!

Power Apps Staff Mr-Dang-MSFT
Power Apps Staff

Re: How To: Powerapp builds HTML to Office365.SendEmail w/ Inline image

@KW001, when you upload media to the media section in PowerApps, it is a blob. Referencing it, you'll get something like 

appres...

It is not a URL.

 

It sounds like you just want a logo. If there's a copy on your company's website that is already publicly referenced, you'll have the least friction by using that URL. 

KW001
Level: Powered On

Re: How To: Powerapp builds HTML to Office365.SendEmail w/ Inline image

@Mr-Dang-MSFT  the problem I am running into is I am inside a large international corporation with dozens of layers of IT security. And when I try to just use a linked image from an intranet publicly available site, it barfs. The image in question is not externally facing / available outside the corporate network (internet). It's an internal "logo" for the business unit, not the entire company. I've tested with a "public" sharepoint and it barfs on displaying the image in the email. That was my first try before reaching out to the community lol.

 

I also tried a regular web content image linking that was not a sharepoint but rather just an internal company page. That didn't work either.

 

Working on @KickingApps latest recommendations this afternoon

KW001
Level: Powered On

Re: How To: Powerapp builds HTML to Office365.SendEmail w/ Inline image

I think a lot of the issue is that corporate web security & enterprise O365 security get in the middle when trying to pull web resources using the sendmail function from a powerapp. That was one of the reasons I was trying to use the media of the app as the attachment. It boggles my mind that Microsoft did not include a method to attach existing app media resources into an email when using the sendmail function. A resource that is part of the app itself is not accessible to the app sendmail function? I cannot be the only one trying to do something like this! lol

KW001
Level: Powered On

Re: How To: Powerapp builds HTML to Office365.SendEmail w/ Inline image

For example

 

  1. If you add an image to the media of the app
  2. Create a new screen
  3. Go to Insert > Media > Image
  4. Then go to the image on the screen and in the Image attribute of the on screen image set it to the media item ("Logo" in this case), it will display the image on the screen! Woohoo!
  5. If you then Insert > Text > HTML Text
  6. And set the HtmlText attribute to:
    1. "<img src=" & Image & "/>"
  7. The HTML text box will be empty. Even though you are referencing media that is part of the running app and also displaying right on the current screen as well!

 

KickingApps
Level 8

Re: How To: Powerapp builds HTML to Office365.SendEmail w/ Inline image

Yes; I had the same experience. That is why I had to place the photo in a SharePoint list, display the image in the gallery and collect the Image itself from the gallery into another collection.  Have you tried storing in SharePoint and collecting so you get the thumbnails?

Updated - *Oddly, when returning to the email after a couple of days, the image is no longer is present. Only an image placeholder. So, email will send with logo initially. But for some reason, the image is not available within the email after bit of time passes.

KW001
Level: Powered On

Re: How To: Powerapp builds HTML to Office365.SendEmail w/ Inline image

@KickingApps Thank you for all your efforts and wisdom! I've settled for not including the logo at this time. I can't afford to work on this solution any longer. I will work on improvements to the app I built probably next year. But for now a text item will have to do. 

 

@Mr-Dang-MSFT thank you as well! 

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,999)