Solved

use delphi to send e-mail via outlook

Posted on 1998-10-26
6
163 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 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