Point to a directory of shared images on Play! Email HTML Schema

In Game! Framework application: -

Trying to make an image from a shared images folder in an HTML email. I have installed

application.baseUrl=http://localhost:9000/ 

in application.conf, then in my email viewer template I have

 <IMG height="88" src="@{'/public/images/logo-banner.jpg'}" width="700" border="0"> 

but in the HTML source of the received email, the image still has a relative rather than an absolute path. What is the correct way to host a baseurl application?

+4
source share
1 answer

Ok, I found the answer - you should use double-at notation @@ {..} when you include links in the application in the email. Double-at ensures that absolute URLs are used, not relative URLs, which is necessary when linking from the site.

So my sample template code above

 <IMG height="88" src="@@{'/public/images/logo-banner.jpg'}" width="700" border="0"> 
+6
source

Source: https://habr.com/ru/post/1382959/


All Articles