Solved

How to send a HTML FORMAT mail with Winsock?

Posted on 2002-05-17
5
175 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 50 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

830 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