Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I send html e-mail with idSMTP

Posted on 2004-04-08
4
Medium Priority
?
1,454 Views
Last Modified: 2012-05-04
Can someone give me an example of how to send html messages with idSMTP ?

<Moved as requested by mlmcc PE for Pascal>
0
Comment
Question by:pucko
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 1

Author Comment

by:pucko
ID: 10782719
Oops. this is ment to be in the Delphi area. I will try to move it there....
0
 
LVL 9

Accepted Solution

by:
mocarts earned 500 total points
ID: 10789357
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
 
LVL 9

Expert Comment

by:mocarts
ID: 10789363
oops, you need a HTML mail :) just a moment :)
0
 
LVL 9

Expert Comment

by:mocarts
ID: 10789476
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question