Author Topic: HTML eMail - Pictures are not visible  (Read 4008 times)

elbsailor

  • Newbie
  • *
  • Posts: 2
HTML eMail - Pictures are not visible
« on: February 12, 2017, 12:51:13 am »
I am using Aqua Mail Pro in our company since some while and we are satisfied.

But we have a problem that Images in one of our emails are not shown. In other HTML eMails images are shown - loading images is enabled. Any idea what the problem is?

Attached a screenshot and the HTML Code.

nica

  • Guest
Re: HTML eMail - Pictures are not visible
« Reply #1 on: February 12, 2017, 02:45:54 am »
In your HTML-Code you are using relative paths to your images. I think, in mails you will need absolute paths instead.


http://www.coffeecup.com/help/articles/absolute-vs-relative-pathslinks/
https://en.m.wikipedia.org/wiki/Path_(computing


StR

  • Hero Member
  • *****
  • Posts: 1558
Re: HTML eMail - Pictures are not visible
« Reply #2 on: February 12, 2017, 05:06:50 am »
I would assume that you are asking about the images that you expect to appear on the left (where "alternative text" is shown instead), correct?

First, by default Aquamail does not show remote images (privacy reason, - this is how spammers verify that your address exists). So, you need to allow Aquamail showing remote images explicitly.

Second, I see that the way the images are linked is not but using full URLs, but rather
<base href="https://www.sinojobs.com/" /> with the relative links for each image:

<img alt="Product Development Engineer Trainee (m/f)" src="typo3temp/_processed_/csm_logo-_Hirschvogel_fd207c19dd.jpg" width="139" height="56" />
<img alt="Intern" src="typo3temp/_processed_/csm_VW_Logo_Tianjin_a1cdc27454.png" width="139" height="56" />
<img alt="VICE PRESIDENT OF OPERATIONS M/F Trendsetting Consumer Goods" src="typo3temp/_processed_/csm_GIF_Online-Einzellogo-001_f067764878.jpg" width="139" height="68" />
<img alt="Verkäufer im Duty-Free Shop (m/w)" src="typo3temp/_processed_/csm_drubba-logo_e46d0f9f4f.png" width="139" height="56" />

I am not sure if the WebView component of Android (which is used by Aquamail) can handle that.

Lastly, - I see that HTML validator ( http://validator.w3.org/#validate_by_input ) shows a bunch of HTML errors. Sorry, I don't have time and energy at the moment to check the details, - but it shows a huge number of error in the HTML.

PS. I see that Nica posted the same idea (I was interrupted for a few hours in the process of writing this response). I'll just leave my response without any modifications.


Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: HTML eMail - Pictures are not visible
« Reply #3 on: February 12, 2017, 04:36:50 pm »
For Aqua Mail to be able to show images at *relative* URLs (as correctly pointed out above), you need to include a <base> tag in the HTML code, before (above) the first relative link (also correctly pointed out above).

Just think about it:

An email message is self-contained, it has no "context", an email app can't know that it "belongs" to a particular web site, and can't resolve relative links automagically. Relative links on a web page work, because the web page itself is located at "some" URL, which provides that needed base for resolving relative links.

Another option is to use absolute URLs, with protocol and hostname (because I'm not sure if all mail apps out there support <base>).
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

elbsailor

  • Newbie
  • *
  • Posts: 2
Re: HTML eMail - Pictures are not visible
« Reply #4 on: February 13, 2017, 02:14:26 pm »
Thank you so much for your really fast and accurate reply. We could solve the issue with the links.

We are working on a responsive Newsletter and I will ask the programmer to focus on the HTML Codes.

I also found this tool for testing:
litmus(dot)com
Any other suggestions we should focus on or testing we should do for the new responsive newsletter?
Or a contact to a programmer that is focused on HTML for responsive newsletter? Maybe he could do the job.

Again, thank you very much, guys!

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: HTML eMail - Pictures are not visible
« Reply #5 on: February 14, 2017, 04:24:13 pm »
For Aqua Mail to be able to show images at *relative* URLs (as correctly pointed out above), you need to include a <base> tag in the HTML code, before (above) the first relative link (also correctly pointed out above).

Just think about it:

An email message is self-contained, it has no "context", an email app can't know that it "belongs" to a particular web site, and can't resolve relative links automagically. Relative links on a web page work, because the web page itself is located at "some" URL, which provides that needed base for resolving relative links.

Another option is to use absolute URLs, with protocol and hostname (because I'm not sure if all mail apps out there support <base>).

Kostya,

So, a question for you: does Aquamail support <base ..> ?
From your response it sounds that it does.
If so, - then it appears that you might have missed: the message in question does have <base ...> at the top, as I pointed out. If Aquamail understands  it, some other error(s) is the culprit.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: HTML eMail - Pictures are not visible
« Reply #6 on: February 14, 2017, 10:31:59 pm »
Re: So, a question for you: does Aquamail support <base ..> ?

Yes.

Re: then it appears that you might have missed: the message in question does have <base ...> at the top, as I pointed out. If Aquamail understands  it, some other error(s) is the culprit.

You're right, I'd missed it. Sorry. Will take a look.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: HTML eMail - Pictures are not visible
« Reply #7 on: February 14, 2017, 10:51:59 pm »
I see it now.

The problem is that those relative links don't start with "/" (which the app checks for safety / security). I'll see if I can change that.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: HTML eMail - Pictures are not visible
« Reply #8 on: February 14, 2017, 11:40:23 pm »
Fixed in AquaMail-market-1.8.0-190-stable-fa38f1997e88.apk which I'm going to post soon.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: HTML eMail - Pictures are not visible
« Reply #9 on: February 15, 2017, 01:45:10 am »
It's nice you were able to figure it out quickly and easily!

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: HTML eMail - Pictures are not visible
« Reply #10 on: February 17, 2017, 10:50:25 pm »
Re: It's nice you were able to figure it out quickly and easily!

But I wasn't, I'd missed it completely. Only thanks to "a certain StR" I was able to see that the "base" tag was already present.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/