Opening standard mail client

  • Thread starter Thread starter Bernhard Straub
  • Start date Start date
B

Bernhard Straub

Hi,

using vb .NET 2003 I am trying to open the standard mail client. The mail
window should open and the user should be able to choose the recipient, add
some text to the mail etc.

Using Process.Start with "mailto" doesn't help as I want to add attachments
already in the code. I don't want to use the Outlook reference as the user
may not have Outlook installed on the system. I found that something called
Simple MAPI may be used but I was not able to find an example, some articles
in the MS knowledge base about this subject are no longer existent.

Any other ideas how this can be done?

Thanks for any help :-)
Bernhard
 
Bernhard Straub said:
using vb .NET 2003 I am trying to open the standard mail client. The mail
window should open and the user should be able to choose the recipient,
add some text to the mail etc.

Using Process.Start with "mailto" doesn't help as I want to add
attachments already in the code. I don't want to use the Outlook reference
as the user may not have Outlook installed on the system. I found that
something called Simple MAPI may be used but I was not able to find an
example, some articles in the MS knowledge base about this subject are no
longer existent.

IIRC Simple MAPI isn't suitable for solving the problem too because it
cannot be used to launch the mail client with the mail opened.
 
Try using a "shellexecute" of mailto:recipient

this will popup the default mailer with the address filled in.

In VB.Net 2003 you need to use the process class with a processinfo to start
a process and not the shellexecute instruction anymore.

HTH

SBS
 
Sorry, that doesn't help since I'd like to add an attachment ;-)

Any other ideas? I guess I could do late binding and check if Outlook is
present on the system. But this doesn't really satisfy me...

Bernhard
 
Dear Bernhard Straub,

Why do you want it to open the default email client? Why not create a form
where you can enter these values?

Michel van den Berg
 
Dear Michael,

I'm developing an addin for MindManager From this it should be possible to
send a file to an email recipient. Of course I could add a form where users
could enter all the necessary values (smtp server etc.) but I think this is
rather ugly. Also I'm not sure but I think a mail which would be sent like
this does not appear in the outbox of the mail client (?).

When you are in Office or MindManager there is a Send to-functionality and
the mail client is opened. This is the usual environment and offers all
editing possibilities.

My current solution is that I check if Outlook is installed and use late
binding. If Outlook is not found then the option to send mail is just not
present. I still hope for a universal solution that works with every MAPI
mail client (Outlook Express, Thunderbird...).

Bernhard Straub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top