DelphiFAQ Home Search:

Send email from Delphi


comments19 comments. Current rating: 5 stars (8 votes). Leave comments and/ or rate it.

It can be so easy to have your application pop up an email window.. assuming that a mail reader is installed (see below):

(Thanks to Kevin for improving the code with the body= parameter.)

  ShellExecute(0,'open','mailto: subject&body=my message text',
               NIL, NIL, SW_SHOWNORMAL);

Content-type: text/html


You are on page 1 of 2, other pages: [1] 2
2005-11-30, 11:58:53
anonymous from United States  
2006-03-31, 13:29:25
anonymous from Morocco  
j'ai l'honneur pour ecrire ce petite demande pour me postuler un poste dans votre etablissment .
jbilou ahmed
2006-05-28, 23:09:49
anonymous from India  
How i can send mails yahoo mail id etc through delphi program
2006-06-22, 03:47:44
Gilby from Hungary  
That is what I looked for!
2006-09-26, 06:57:20
Share√® from South Africa  
Thanks, short and sweet and very helpful!
2006-11-06, 05:38:41
RTS from Poland  
That is what I looked for!
2007-02-27, 17:44:49
Shendrik from Israel  
Thank you!!!
2007-05-08, 04:36:07
anonymous from India  
Exellent and gud help
thank you......
2008-01-23, 00:27:54
anonymous from Azerbaijan  
Good, But
I dont need OutLook sending. How can Isenda wiht other way?
2009-04-06, 05:51:22
anonymous from Indonesia  
good, but how if I will send with attachment file ?
2009-04-23, 08:09:50
from Poland  
2009-06-18, 08:04:25
anonymous from Turkey  
This Project is easy-going and bad..
2009-06-24, 04:34:47
anonymous from Romania  
the code it`s ok, but it open outlook .... i don`t want to use outlook ! how can i do it ?? i mean i don`t want to see the outlook window but i want to recieve email after clicking on a buton on my application, here`s the story one of my apps create a log file and i want to recieve that file on my email account...
2009-06-25, 06:48:29
anonymous from India  
Hi all,

I want to send automatic mail from my Delphi application with attachment without invocation of any client tool like outlook. Actually My application runs as a windows service and every 5 minute generate some response files. I want those files to be mailed automatically. But how do I do that?

thanks n regards
2009-08-07, 05:57:12
Little-Programmer from Thailand  
Thankyou So much
You are on page 1 of 2, other pages: [1] 2



NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: