473,800 Members | 2,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Invoke Email Client

I have a Windows application in which users can select one or more
individuals and an email message is created which they then complete and
send. I currently use MAPI for this but I want to change the code to invoke
whatever email client the users has as the default. Any pointers to some
information on how to do this would be appreciated.

Wayne
Nov 20 '05 #1
6 3083
www.vbip.com

Wayne Wengert wrote:
I have a Windows application in which users can select one or more
individuals and an email message is created which they then complete and
send. I currently use MAPI for this but I want to change the code to invoke
whatever email client the users has as the default. Any pointers to some
information on how to do this would be appreciated.

Wayne


Nov 20 '05 #2
Hi there.
Try opening a link to mailto:a@b.c;d@ e.f&subject=sub jec&body=body
In .Net it could be
Process.Start(" mailto:a@b.c;d@ e.f&subject=sub jec&body=body")

Does it help?
Andre Nogueira

"Wayne Wengert" <wa************ ***@wengert.com > wrote in message
news:Ox******** ******@TK2MSFTN GP11.phx.gbl...
I have a Windows application in which users can select one or more
individuals and an email message is created which they then complete and
send. I currently use MAPI for this but I want to change the code to invoke whatever email client the users has as the default. Any pointers to some
information on how to do this would be appreciated.

Wayne

Nov 20 '05 #3
Works like a charm - thanks

Wayne

"Andre Nogueira" <an**@netcabo.p t.NOSPAM> wrote in message
news:eN******** ******@TK2MSFTN GP10.phx.gbl...
Hi there.
Try opening a link to mailto:a@b.c;d@ e.f&subject=sub jec&body=body
In .Net it could be
Process.Start(" mailto:a@b.c;d@ e.f&subject=sub jec&body=body")

Does it help?
Andre Nogueira

"Wayne Wengert" <wa************ ***@wengert.com > wrote in message
news:Ox******** ******@TK2MSFTN GP11.phx.gbl...
I have a Windows application in which users can select one or more
individuals and an email message is created which they then complete and
send. I currently use MAPI for this but I want to change the code to

invoke
whatever email client the users has as the default. Any pointers to some
information on how to do this would be appreciated.

Wayne


Nov 20 '05 #4
That is an excellent resource - thanks!

Wayne

"Supra" <su*******@roge rs.com> wrote in message
news:jE******** *******@news04. bloor.is.net.ca ble.rogers.com. ..
www.vbip.com

Wayne Wengert wrote:
I have a Windows application in which users can select one or more
individuals and an email message is created which they then complete and
send. I currently use MAPI for this but I want to change the code to invoke whatever email client the users has as the default. Any pointers to some
information on how to do this would be appreciated.

Wayne

Nov 20 '05 #5
* "Wayne Wengert" <wa************ ***@wengert.com > scripsit:
I have a Windows application in which users can select one or more
individuals and an email message is created which they then complete and
send. I currently use MAPI for this but I want to change the code to invoke
whatever email client the users has as the default. Any pointers to some
information on how to do this would be appreciated.


From my FAQ:

Opening the default mail client with a mail template:

Sample based on work by Fergus Cooney and Cor (mpdl.vb), optimized and
extended by Herfried K. Wagner [MVP]:

Add a reference to "System.Web.dll ". Then you can use this code:

\\\
Imports System.Diagnost ics
Imports System.Web

Public Sub StartDefaultMai l( _
ByVal [To] As String, _
Optional ByVal Subject As String = "", _
Optional ByVal Message As String = "" _
)
Try
Dim psi As New ProcessStartInf o
psi.UseShellExe cute = True
psi.FileName = _
"mailto:" & HttpUtility.Url Encode([To]) & _
"?subject=" & HttpUtility.Url Encode(Subject) & _
"&body=" & HttpUtility.Url Encode(Message)
Process.Start(p si)
Catch ex As Exception
Throw _
New Exception( _
"Default mail client could not be started.", _
ex _
)
End Try
End Sub
///

Usage:

\\\
StartDefaultMai l( _
"fo*@goo.ba z", _
"Invitation ", _
"Do you want to come to my party?" _
)
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #6
np. u welcome.
regards

Wayne Wengert wrote:
That is an excellent resource - thanks!

Wayne

"Supra" <su*******@roge rs.com> wrote in message
news:jE******** *******@news04. bloor.is.net.ca ble.rogers.com. ..
www.vbip.com

Wayne Wengert wrote:

I have a Windows application in which users can select one or more
individual s and an email message is created which they then complete and
send. I currently use MAPI for this but I want to change the code to
invoke
whatever email client the users has as the default. Any pointers to some
informatio n on how to do this would be appreciated.

Wayne



Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4107
by: John Altland | last post by:
Here is my basic problem. I have a form that executes a cpu instensive algorithm occupying the first thread. When the algorithm is executed another form pops up telling the user the progress that has been made. Whenever I attempt to update my frmProgress, the events are put placed at the end of the thread's queue and executed after my algorithm is finished. Using the frmProgress.Label.Invoke method with delagates, I have heard would fix...
1
1700
by: Lubo¹ ©lapák | last post by:
Hi, How can I invoke new render of aspx page from C# code. Thanks Lubos
14
7355
by: stic | last post by:
Hi, I'm in a middle of writing something like 'exception handler wraper' for a set of different methodes. The case is that I have ca. 40 methods form web servicem, with different return values (and types), and with out parmeters. What I want to do is to support each method call with exception (http 404, soap exception, and other types of exceptions) and wrap it with try & catch (a lots of catch ;-)
2
2259
by: kapila Wijethilaka | last post by:
Hello, I want to invoke clients iExplorer from my axpx page. I did a some cod eto dot this.but it gave me below error. can anybody help me with this thanks Access is denied.
3
2245
by: m.posseth | last post by:
Hello does someone know how i can invoke a method in the underlying thread without the usage of a window handle ?? This works perfect in a form Me.Invoke(New MethodInvoker(AddressOf ShowRecvdMessage))
3
3292
by: FNZB | last post by:
Hi, Does anyone know how to do the equivalent of me.invoke from within a module? Cheers..
5
7657
by: Richard | last post by:
Hello, I'm working on an application to allow our network team to use a small application to make DHCP reservations on our Microsoft DHCP Server. The problem is you have to use P/Invoke to do it, and from what I've found on the web and in this newsgroup is that it's not easy, however I believe it can/has been done. At the moment I'm just trying to find out information about an existing
14
4851
by: luc.saffre | last post by:
Hello, the simplest way to launch the user's standard mail client from a Python program is by creating a mailto: URL and launching the webbrowser: def mailto_url(to=None,subject=None,body=None,cc=None): """ encodes the content as a mailto link as described on http://www.faqs.org/rfcs/rfc2368.html
2
2499
by: Vighneswar | last post by:
Hi All I am doing with a standalone application in .NET, where I have to invoke the Outlook / Outlook Express by passing account info (username, password, pop3 server, ... etc) and SQL Server client by passing the connection details. I request anyone can suggest me the approach in meeting the requirement. Thanks in advance. Regards
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10507
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10279
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10255
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9092
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7582
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.