Solved

calling eudora and netscape within Delphi

Posted on 1997-08-24
3
244 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
[X]
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
  • 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

Technology Partners: 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!

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month10 days, 23 hours left to enroll

632 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