How can Place an image in my EMail message

453 Views Asked by At

I am testing Delphi ChilKat component to send EMail

How can Place an Image as part of my EMail signature, not an attach.

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

You still have to attach the image, but you attach it as a related item with a Content-ID header assigned to it, not as a normal attachment. You can then display that image in the email body using an HTML <img> tag with a cid: url to refer to the image's ID as the image source.

The Chilkat DLL has several CkEmail_AddRelated...() functions, and the Chilkat ActiveX object has several AddRelated...() methods, for this purpose.

Here are some examples provided by Chilkat (you did not say which Chilkat API you are actually using - the DLL or the ActiveX):

Email Object Examples for Delphi DLL

SMTP Examples for Delphi DLL

Email Object Examples for Delphi ActiveX

SMTP Examples for Delphi ActiveX