Solved

How to send a HTML FORMAT mail with Winsock?

Posted on 2002-05-17
5
170 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
Comment Utility
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
Comment Utility
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
Comment Utility
Force Accepted

SpideyMod
Community Support Moderator @Experts Exchange
0
 
LVL 14

Expert Comment

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

Expert Comment

by:SpideyMod
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now