• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

use delphi to send e-mail via outlook

is there any way to put in the outbox folder under outlook express, a message to an email written in a textbox, and with an attachment, without using outlook, just A single delphi program?

Please post full code.
1 Solution
Hi jpcs,

procedure TForm1.Button1Click(Sender: TObject);
         TempUrl : string;
         TempUrl:='mailto:tom.deprez@village.uunet.be?subject=Your subject&body=test body';


you can use this for outlook, but I don't think it's possible to send attachements.

To send attachments, use MAPI, but Outlook isn't MAPI compliant.  Exchange is.

So, I guess you've to make a tough descision.

I do not entirly understand your question.

Do you want to start a email message box from Outlook without starting outlook entirly? Or do you want to create a message compatible with outlook?
jpcs:::      to use ShellExecute, you have to add SHELLAPI to the Uses clause

( uses  Windows, Messages, SysUtils, Cla... )

hey Zif, it works perfectly !

bryan =)

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

thanks for the support bryan :-)
jpcsAuthor Commented:
Sorry for the delay... been absent.

I can't accept the answer, because Outlook is possible to the  MAPI client as default (set it up in options), and I know it's possible to do wat I want, since Photo Shop 5 does it... (If you have an image opened and click on send in the File menu, it opens outlook in a new message and the message is in the attachments section.

Hi jpcs,

then use a the MAPI component : tEmail2.


It's good, I used it once.

Regards, Zif.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now