Posts

Showing posts from September, 2016

Send Email with HTML body format in Delphi

Sometime we need to send Email with HTML body format. So here I have explained two approach to send HTML Email by using Delphi. 1. By using  TIDText object With Indy components we can use same TIDSMTP and TIDMessage components to send a Email with normal Text body or HTML body in Delphi. But we also need to initiate a TIDText object so that we can set its   ContentType = text/html to allow HTML body format. And if we need an Image in HTML body then we also need to attach that image to mail body. So for that we need to create a  TIdAttachment object also. Here are the code details how to use TIDText.  And for this example I assume that we have already put TIDSMTP and TIDMessage component on form and also set required properties. For more information how to use TIDSMTP and TIDMessage visit my following blog. How to send Email in Delphi? lSMTP    : TIdSMTP; lMessage: TIdMessage; procedure TFormEmail.HTMLEmailSendClick(Sender: TO...