Solved

calling eudora and netscape within Delphi

Posted on 1997-08-24
3
241 Views
Last Modified: 2010-04-06
I'm writing a program in Delphi 3.0 that pops up when it's one of my friends birthday. I'd like to be able to call an  email-program (any, MS, Netscape, Eudora) from my own program and send him/her a message.
Just to open the email-program and fill in the email address (sort of clicking in a html  document with the mailto: command)

On the other hand it would also be nice, to be able to open an url in Netscape or MSIE the same way ( for one of those free animated greeting card sites )
0
Comment
Question by:michaelsanders
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
icampbe1 earned 100 total points
ID: 1342316
Hi there michaelsanders,

Both of these can be done with the ShellExecute routine.   First, you have to add 'ShellAPI' to you uses clause.  

For the mail, do the following:

VAR Cmd: String;

Cmd := 'mailto:iancamp@interlog.com';
ShellExecute(0, 'open', PChar(Cmd), nil, nil, SW_SHOWNORMAL);
{This will fill in the target address to send mail to me. }

To fire up your default browser with a URL, try this:

Cmd := 'http://www.microsoft.com/';
ShellExecute(0, 'open', PChar(Cmd), nil, nil, SW_SHOWNORMAL);
{this of course goes to the MS home page}

I hope this helps you out.

Cheers,
Ian C.
0
 
LVL 1

Author Comment

by:michaelsanders
ID: 1342317
The command 'mailto:iancamp@interlog.com' doesn't seem to do anything, no Eudora or Netscape pops up. However the 'http://' command works just fine. Thanks Anyway!
0
 
LVL 2

Expert Comment

by:icampbe1
ID: 1342318
It'll work if you have a mail client registered, like Internet mail.  I'm not sure that Eudora registers itself when you install it.  

Cheers,
Ian C.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

803 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