Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to send a HTML FORMAT mail with Winsock?

Posted on 2002-05-17
5
Medium Priority
?
180 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
[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
  • 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

Independent Software Vendors: 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…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

662 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