cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Notification email image not showing

I am setting up some custom header images on my development server and the image shows on the server if I use

src="http://localhost/ESD/Images/Customer/AppPortalheader.jpg"

Using the server name, the image disappears so I tested in Edge and using local host the image appears.  Using the server name, the image prompts for login and I can't determine what's causing that.

I've checked IIS settings and system.webServer/security/authentication/windowsAuthentication is 'Unlocked' for both the Default Web Site and ESD web sites.  Authentication settings for both sites have Anonymous disabled and Windows Authentication enabled.  

Is there something else that I might have missed?

(1) Solution

What I mean by embedding the image is that you are including the binary data in the HTML for the email.  What you show in your question above is not embedding the binary data but rather embedding an image link, which will still render as an image when the email is opened.  But the actual contents of the image are not contained in the email.  Instead, the email client must reach out to the server to load that image that resides on the server.  When you are testing with the server name, are you including a fully qualified computer name (i.e. with domain) or just the NetBIOS computer name?  If using a NetBIOS name, that should be interpreted  by the browser as a Local Intranet zone web site and will attempt to pass through the user's domain login credentials when met with an authentication prompt.  If using a fully qualified name, this will normally be interpreted by the browser (or email client in this case) as being in the Internet zone and will not pass through Windows authentication.  You can generally solve that by adding the FQDN of the server into the Local Intranet or Trusted Sites zone (either manually or through AD Group Policy).  If you're really trying to embed the binary data for the image into the email message so the client doesn't need to connect to the server at all, then the easiest way to do that is to load the image in Paint or your browser, right-click copy the image, then paste into the Notification editor in Design view.  After doing that, if you switch to the HTML tab in the Notification editor, you should see the image data as Base64-encoded text.

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".

View solution in original post

(5) Replies

Are you wanting to embed the image into each email, or do you just want an image reference link in the email so that it has to load the image from the server when they open the email?  You can do either, but in the case of embedding the actual image, you need to consider the size of the image and the storage/network impact of sending multiple copies of the image through your email system.  If you just want a reference, I would suggest placing that image in a folder outside of the App Broker website (e.g. create a new "Images" folder directly under the Default website in IIS).  Then you can enable anonymous authentication on that Images folder and it should not prompt anyone for authentication when loading that image in the email.

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".

I'm embedding to mimic my production server.  The development server also used to embed the image fine and then it was upgraded and moved to new infrastructure in the same environment so I'm really not sure why as soon as I edit the email notification it doesn't work.  I can try the images but was really just hoping I might have missed a setting in this environment

What I mean by embedding the image is that you are including the binary data in the HTML for the email.  What you show in your question above is not embedding the binary data but rather embedding an image link, which will still render as an image when the email is opened.  But the actual contents of the image are not contained in the email.  Instead, the email client must reach out to the server to load that image that resides on the server.  When you are testing with the server name, are you including a fully qualified computer name (i.e. with domain) or just the NetBIOS computer name?  If using a NetBIOS name, that should be interpreted  by the browser as a Local Intranet zone web site and will attempt to pass through the user's domain login credentials when met with an authentication prompt.  If using a fully qualified name, this will normally be interpreted by the browser (or email client in this case) as being in the Internet zone and will not pass through Windows authentication.  You can generally solve that by adding the FQDN of the server into the Local Intranet or Trusted Sites zone (either manually or through AD Group Policy).  If you're really trying to embed the binary data for the image into the email message so the client doesn't need to connect to the server at all, then the easiest way to do that is to load the image in Paint or your browser, right-click copy the image, then paste into the Notification editor in Design view.  After doing that, if you switch to the HTML tab in the Notification editor, you should see the image data as Base64-encoded text.

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".

Thanks Jim! After all these years I can just copy and paste the image?!?! That makes it so easy! 

This approach applies not only to email notifications, but also to other content on the site (welcome page, help page, catalog descriptions, etc.).  But one small side effect I'll point out when using this approach for catalog descriptions is that the Base64 text for the image that is contained in the description is included in the search when someone searches the catalog (just like any other text in the description).  As a result, you may find that some searches will return strange results because the word being searched is actually found within the "random" text representing the image.  This should not be an issue when using this approach for notifications.

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".