Solved

calling eudora and netscape within Delphi

Posted on 1997-08-24
3
238 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 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