How to send mail with tSendMail and a logo in the signature ?

Four Stars

How to send mail with tSendMail and a logo in the signature ?

Hello,

I have to send emails including a logo after the signature.

The logo is stored on the server as PNG file and I call it by an URL in an Oracle request :

"
SELECT '<img src:\"http://ServerID:8080/data/Logo.png\" />' as LOGO
FROM dual
"

=> ServerIP is....... the server IP

=> backslash are used before the echapment character "

Then, in a tMap, I build the text of the email and add to it the variable containing the URL.

It looks like :

"I sent you the order AAA the 10/04/2019 and I am still waiting for your acknowledgement.<br>Please confirm as soon as possible the delivery date.<br>Regards,<br>JOHN DOE<br>"  + row1.LOGO

It is transfered to the tSendMail where I call the column in the message zone.

There is no error, the job is OK but there is no logo in my email... 

Did someone already do this with the tSendMail component ? Is there another way ?

Thanks for helping

 

(Screenshots in attachments)


Accepted Solutions
Nine Stars

Re: How to send mail with tSendMail and a logo in the signature ?

Here are some ideas on what you could try:

 

  • Add a tLogRow before the sendmail component to see exactly what the content is that you are sending to the email body.  Take the output from the tLogRow, save as a .html file on your desktop, and open in a browser and make sure it looks OK.
  • Check in a browser that you can bring up the image at that URL.
  • Confirm that the rest of the message is in your email but just not the image.
  • Confirm that the email is being interpreted as HTML in your email client.
  • View source in your email to see the HTML to see if the image tag is there.
  • You may not need to escape the double quotes in the image tag. Try without that.
--
Please give Kudos and mark topics as solved where appropriate.

View solution in original post


All Replies
Nine Stars

Re: How to send mail with tSendMail and a logo in the signature ?

Here are some ideas on what you could try:

 

  • Add a tLogRow before the sendmail component to see exactly what the content is that you are sending to the email body.  Take the output from the tLogRow, save as a .html file on your desktop, and open in a browser and make sure it looks OK.
  • Check in a browser that you can bring up the image at that URL.
  • Confirm that the rest of the message is in your email but just not the image.
  • Confirm that the email is being interpreted as HTML in your email client.
  • View source in your email to see the HTML to see if the image tag is there.
  • You may not need to escape the double quotes in the image tag. Try without that.
--
Please give Kudos and mark topics as solved where appropriate.

View solution in original post

Four Stars

Re: How to send mail with tSendMail and a logo in the signature ?

Hello nfz11 !

Thanks for your solution.
It allowed me to see that the string
<img src:\"http://ServerID:8080/data/Logo.png\" /> in my request was wrong.
The good string is :
<img src=\"http://ServerID:8080/data/Logo.png\" />
("=" instead of ":" after "img src")

It was just a syntax issue Smiley Happy
Sometimes, the issue is so big you don't see it !
Thanks again !
Nine Stars

Re: How to send mail with tSendMail and a logo in the signature ?


@ewadhervouet wrote:
Hello nfz11 !

Thanks for your solution.
It allowed me to see that the string
<img src:\"http://ServerID:8080/data/Logo.png\" /> in my request was wrong.
The good string is :
<img src=\"http://ServerID:8080/data/Logo.png\" />
("=" instead of ":" after "img src")

It was just a syntax issue Smiley Happy
Sometimes, the issue is so big you don't see it !
Thanks again !

Great, I am glad you were able to solve it.

--
Please give Kudos and mark topics as solved where appropriate.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog