Skip to main content

Hi,

Currently we write a html(body) file as the actual email - where we for example want to have a company logo embedded in the email.  (as in <img src=”...”>). Then we start the smtp_connector and use this html(body) as input. For DevExpress this a html(body) content that is provided from a view column. (Which in turn will generate a pdf report with the image embedded).

Can you share your best practice for this and how you have implemented these embedded images?

(i.e. use an external website (and how do you serve/upload the picture?) or use CID or base64 or ???)

Thanks

Ricky

ps. The email variant will not embed the picture due to the location of the <img src=”\\somelocalserver\picture.png”>, the DevExpress report will work just fine. changing the location of the picture to say for example https://i.imgur.com/tt5Vrmp.png (as you do for your emails) will surely work for emails but I haven’t checked if this would work for DevExpress reports

Hi Ricky, 

The method that is commonly used is converting a varbinary string to a base64 string and then using <img src=data:image/png;base64, ...> inside a HTML field in DevExpress. This way you can save png files in the database as varbinary strings and use them inside DexExpress reports as pictures.

Kind regards,
Mark Jongeling


Reply