Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send an email using the DEFAULT MAIL CLIENT

Status
Not open for further replies.

awesomebeats

Technical User
Nov 29, 2001
25
US
i'm wondering the best way to send an email using Visual Basic, but not where it automatically pops up Outlook. I want it to bring up their default mail client instead of automatically using Outlook, right now I have it so it brings up outlook, whats the best way to make it for the Default Mail client?
 
Note: Outlook is the default mail client.

To manage mail directly by your application use either MAPI or Winsock.

 
no i mean what if they dont have outlook set as their default mail client, as of now it automatically pops up outlook but if thats not the default how do i call that? or will it automatically do it?
 
What do you mean by it automatically pops up outlook ?

The way I have sent mail from my application through Outlook is to actually instantiate Outlook and use its Send method. Whether Outlook is set as default or not will not matter one whit, because I am expressly asking for Outlook to come to work.

In this case, if Outlook is not installed, the application will simply crash and burn.

If you are not sure whether the user will have Outlook installed, don't depend on Outlook for your email needs; painfully use Winsock. Each PC will have it.

Dimandja
 
yes what your saying is right. but assuming they dont have outlook installed, thats what i need to assume. how do i use something universal or bring up their default mail client? how do i use winsock and what is it? or is it easier to program it to use their default mail client?
 
Dim myEmail As Object
Dim myEmailNS As Object
Dim myEmailMessage As Object
myEmail = CreateObject("Outlook.Application")
myEmailNS = myEmail.GetNamespace("MAPI")


thats the top of the code... if you notice on the 4th line it says "Outlook.application" is there some way to make it instead of an Outlook email, whatever they haev set as the default?
 
Why not use the mailto process?? Will bring up the default mail client whatever it may be. You can fill in all of the fields by code, and then the user just has to press send and its done.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top