Solved

use delphi to send e-mail via outlook

Posted on 1998-10-26
6
160 Views
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.
0
Comment
Question by:jpcs
6 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1344531
Hi jpcs,

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

       ShellExecute(Application.Handle,'open',PChar(TempURL),nil,nil,SW_NORMAL);
       end;

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.

Zif.
0
 

Expert Comment

by:mtieland
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?
0
 
LVL 3

Expert Comment

by:bryan7
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 =)

0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 8

Expert Comment

by:ZifNab
ID: 1344534
thanks for the support bryan :-)
0
 
LVL 1

Author Comment

by:jpcs
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.

Sorry.
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
ID: 1344536
Hi jpcs,

then use a the MAPI component : tEmail2.

http://www.econos.de/software/borland/email2/index.html

It's good, I used it once.

Regards, Zif.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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 Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now