-2

Trying to format email html. I have 2 image sources. The second one needs to be filled by the first.

I feel like there should be a simple reference of some kind to equal the same information that is contained in the first, without using java.

Does such a thing exist? If not, what would be the easiest way to do so?

<td><a href="destinationlink">

<!--[if mso]><span style="display: none;"><![endif]-->

<img src="ACTUAL SOURCE TO LINK FROM"/>

<!--[if mso]></span><![endif]-->

<!--[if mso]>

<img src="FILLED IN OR REFERENCED HERE"/>

<![endif]--></a></td>

Thank you...

I did plenty of research, but only found java related solutions like OnClick. However I was hoping for something that only used html to reference/link the two strings together.

Seek Truth
  • 143
  • 7
  • Not sure what your asking. Do you want the first src to be the same as the second src? how are you setting the second src? how does the second src determine what is in the first src? – Niles Tanner Apr 17 '17 at 03:33
  • @NilesTanner The first source will have a real link in it. The second source will have that same information copied or linked somehow. That is my question, is there just some kind of simple tagging or id that I can assign to the first source that I can call to fill in the second source without using java? or if not so simple... then how would it be done with java? – Seek Truth Apr 17 '17 at 04:32

1 Answers1

0

The thing about HTML email is that they are static. You can not dynamically link things together. SO to answer your question, to do this in the HTML is not possible. You would have to generate the HTML in the Java layer before the email is send.

If you have questions about how to send things in the Java layer you might look at these resources to start:

How do I send an HTML email? https://www.tutorialspoint.com/javamail_api/javamail_api_send_html_in_email.htm

As for matching the srcs you can just edit the input HTML as just like you would edit a string. However that's a completely different question and might be better asked as a separate question with more of your Java code for reference.

Community
  • 1
  • 1
Niles Tanner
  • 3,911
  • 2
  • 17
  • 29