Re: Sending email from a Delphi application
- From: John <john@xxxxxxxxxxx>
- Date: 24 Aug 2006 22:14:55 -0000
On Thu, 24 Aug 2006 17:46:00 GMT, "DIKonsult"
<dag.idoff@xxxxxxxxxxxxx> wrote:
Hi,
can a beginner get some help with how to create emails from my Delphi 6 or
Delphi 2005 application.
I whant to create mail using the default mail client, MSOutlook/Lotus Notes
mail client which ever is set as the default mail client on the computer,
add recipients, subject, a body text and a file attachemnt and display it
for the user to send.
//Dag
Try this:
var
S: array [0..255] of char;
Mail: String;
begin
Mail := 'mailto:e.brown@xxxxxxxxxxx' + '?subject=test';
StrPCopy(S, Mail);
ShellExecute(handle,'Open', S, nil, nil, SW_SHOW);
end;
This code will send an email to e.brown@xxxxxxxxxxx using the default
email client.
BTW, you might consider using Indy components, they're easy to use.
Have a look at TIdSmtp and TIdMessage I'd say.
.
- Follow-Ups:
- Re: Sending email from a Delphi application
- From: DIKonsult
- Re: Sending email from a Delphi application
- From: Nicholas Sherlock
- Re: Sending email from a Delphi application
- References:
- Sending email from a Delphi application
- From: DIKonsult
- Sending email from a Delphi application
- Prev by Date: Re: Delphi weird behavior
- Next by Date: Re: Sending email from a Delphi application
- Previous by thread: Re: Sending email from a Delphi application
- Next by thread: Re: Sending email from a Delphi application
- Index(es):