Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to send a HTML FORMAT mail with Winsock?

Posted on 2002-05-17
5
Medium Priority
?
181 Views
Last Modified: 2010-05-18
  I have known how to send a TEXT/FORMAT's mail!But,I don't know how to send a HTML/FORMAT's mail!can you help me?!!!
   Thanks a lot!
0
Comment
Question by:yanxiaobai
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 7017803
add this as part of the header of your message:

Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
0
 
LVL 1

Accepted Solution

by:
VENKAT earned 150 total points
ID: 7028888
Hi
    you can use this Delphi component "TGLHTMLTable" to convert ur data to HTML format. so u can send mails using below single line of code. Down below is to convert to HTML page..

     SMTPForm:=TSMTPForm.Create(self);

procedure TStandardForm.HTMLwwDBNavigatorButtonClick(Sender: TObject);
var
     sHtmFile:string;
begin
     //sHtmFile:= ExtractFileNameOnly(StdTable.TableName)+'.htm';
     sHtmFile:= ExtractFileName(StdTable.TableName);
     sHtmFile:= Copy(sHtmFile, 1, Pos('.', sHtmFile)-1)+'.htm';

     GLHTMLTable1.caption     :=Caption;
     GLHTMLTable1.filename:=Mainform.sDir+'\'+sHTMFile;
     StdTable.First;
     GLHTMLTable1.SelectFields;
     GLHTMLTable1.Execute;

     if FileExists(GLHTMLTable1.filename) then begin
          ShowMessage(GLHTMLTable1.filename+' created !');

          if GetComCtlVersion()=ComCtlVersionIE3 then begin
               Mainform.bIE4:=False;
               KWB4IE3Form:=TKWB4IE3Form.create(self);
               Kwb4IE3Form.URLComboBox.text:=GLHTMLTable1.Filename;
               Kwb4IE3Form.GoBtnClick(nil);
               KWB4IE3Form.Show;
          end
          else begin
               Mainform.bIE4:=True;
               KWBMainForm:=TKWBMainForm.create(self);
               KwbMainForm.URLComboBox.text:=GLHTMLTable1.filename ;
               KwbMainForm.GoBtnClick(nil);
               KWBMainForm.Show;
          end;

          Cascade;
     end;
end;
0
 

Expert Comment

by:SpideyMod
ID: 8280699
Force Accepted

SpideyMod
Community Support Moderator @Experts Exchange
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 8281530
been busy doing a lot of cleanups eh, spideymod? :) ... good job
0
 

Expert Comment

by:SpideyMod
ID: 8284036
DragonSlayer,
Yep.  I've taken on the task of cleaning up all 6000+ locked questions across the site.  It daunting, but will be done in a week or so.  Thanks for the kudos.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Screencast - Getting to Know the Pipeline
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

886 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