-2

I am sitting here and panicking, because I started on a work, where my first assigment is to update some linkpirctures, there is missing in a return email for a customer. The path to the picture is 100% correct, but I still do not get any pictures in the email when I test it.

It was the person who worked before here that made this code.

`<a target=\"_blank\" style=\"text-decoration: none;\" 
href=\"https://www.facebook.com/domain.page?ref=ts&amp;fref=ts\">\r\n                                            
<img src=\"http://test.domain.com/images/domainEmail/ico-facebook.png \" 
border=\"0\" style=\"vertical-align: top;\" width=\"29\" height=\"28\" alt=\"fb\" />\r\n`                                        
</a>\r\n

I just deleted the webpage name and put in domain instead. But it is the img src I cannot figure out

<img src=\"http://test.domain.com/images/domainEmail/ico-facebook.png \"

If the picture excist in this link, is it correct what I did? I am a little bit in doubt what the \ means in the context. When I test it, I still do not get any pictures on the email.

Really hope somebody here can help me?

Julie24
  • 279
  • 4
  • 6
  • 19

1 Answers1

2

You have to add a cid

<img src="cid:image1"/>

and then attach an image with the exact name of the cid you specified

You can also of course add the base64 data into you src attribute

<img alt="image1" src="data:image/jpeg;base64,/9j/4S/+RXhpZgAATU0AKgAAAAgACAESAAMAENkDZ5u8/61a+X...more encoding" />
Andre Lombaard
  • 6,985
  • 13
  • 55
  • 96
  • Thank you a lot for your answer. So the link would be: some text – Julie24 May 18 '16 at 07:12
  • It was in a variable before: – Julie24 May 18 '16 at 07:23
  • Hi, @Julie24, you will have to get the image and convert it in your c# application to a base64 string which you can then add to the src attribute. Here is a link to another SO post on how to convert the image http://stackoverflow.com/questions/21325661/convert-image-path-to-base64-string . Or like I mentioned, you have to add a cid, which you can then point to an attachment with the same name, but you will have to physically attach the image – Andre Lombaard May 18 '16 at 08:38