How do I send html e-mail with idSMTP

Can someone give me an example of how to send html messages with idSMTP ?

<Moved as requested by mlmcc PE for Pascal>
LVL 1
puckoAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
mocartsConnect With a Mentor Commented:
procedure TForm1.Button1Click(Sender);
var
  IdMsg : TIdMessage;
begin
  IdMsg := TIdMessage.Create(self);
  try
    with TIdSMTP.Create(self) do
    try
      UserID := sUserID;
      Host := sHost;
      IdMsg.Body.Assign(Memo1.Lines);
      IdMsg.Recipients.EMailAddresses := sToAddress;
      IdMsg.Subject := sSubject;
      IdMsg.From.Address := sFromAddress;
      IdMsg.From.Name := sFromName;
      IdMsg.ReplyTo.Add.Text := sReplyTo;
      Connect;
      Send(IdMsg);
      Disconnect;
    finally
      Free;
    end;
  finally
    IdMsg.free;
  end;
end;

wbr, mo.
0
 
puckoAuthor Commented:
Oops. this is ment to be in the Delphi area. I will try to move it there....
0
 
mocartsCommented:
oops, you need a HTML mail :) just a moment :)
0
 
mocartsCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.