use delphi to send e-mail via outlook

Posted on 1998-10-26
Medium Priority
Last Modified: 2010-04-06
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.
Question by:jpcs
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

Expert Comment

ID: 1344531
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.


Expert Comment

ID: 1344532
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?

Expert Comment

ID: 1344533
jpcs:::      to use ShellExecute, you have to add SHELLAPI to the Uses clause

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

hey Zif, it works perfectly !

bryan =)

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!


Expert Comment

ID: 1344534
thanks for the support bryan :-)

Author Comment

ID: 1344535
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.


Accepted Solution

ZifNab earned 100 total points
ID: 1344536
Hi jpcs,

then use a the MAPI component : tEmail2.


It's good, I used it once.

Regards, Zif.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
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…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

801 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