473,512 Members | 15,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Opening email client window

I am totally new to microsoft technolgy so please bear
with me. All i want to do is to open an email client
software tool (outlook or outlook express) from inside my
application so that people could send email from within my
application. How can I do that? Please help
Nov 15 '05 #1
5 6075
Writing your own is pretty simple....

Basically, create a form to mimic An outlook form..
//I rewrote my VB Code on the fly, might have a typo but
should work.

using System.Web.Mail

Dim m As New MailMessage //MailMessage m = new
MailMessage();
private void btnSend_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs)
m.To = tbTo.Text
m.From = tbFrom.Text
m.Subject = tbSubject.Text
m.Body = rtb.Text
System.Web.Mail.SmtpMail.Send(m)//Key Line here
this.Dispose()

YOu can also add attachments, CC support and BCC support.

Hopefully this helps. Your other alternative is to
reference the Outlook library and create an outlook
message, but if you are just starting, this is a much
easier approach.

Good Luck,

Bill
-----Original Message-----
I am totally new to microsoft technolgy so please bear
with me. All i want to do is to open an email client
software tool (outlook or outlook express) from inside my
application so that people could send email from within myapplication. How can I do that? Please help
.

Nov 15 '05 #2
if you just want to use outlook\outlook express (pretty sure outlook works
with this too, don't have it on this machine to test)
this code will do it, you'll have to put a little work into filling in the
address & subject, but it will work.
System.Diagnostics.Process.Start("mailto:email@add ress?subject=my subject");

"Zack" <sa*****@yahoo.com> wrote in message
news:03****************************@phx.gbl...
I am totally new to microsoft technolgy so please bear
with me. All i want to do is to open an email client
software tool (outlook or outlook express) from inside my
application so that people could send email from within my
application. How can I do that? Please help

Nov 15 '05 #3
forgot to mention, in theory, that should work with any mail application
that provides a mailto app.
"Daniel O'Connell" <on******@comcast.net> wrote in message
news:9N83b.211355$cF.68209@rwcrnsc53...
if you just want to use outlook\outlook express (pretty sure outlook works
with this too, don't have it on this machine to test)
this code will do it, you'll have to put a little work into filling in the
address & subject, but it will work.
System.Diagnostics.Process.Start("mailto:email@add ress?subject=my subject");
"Zack" <sa*****@yahoo.com> wrote in message
news:03****************************@phx.gbl...
I am totally new to microsoft technolgy so please bear
with me. All i want to do is to open an email client
software tool (outlook or outlook express) from inside my
application so that people could send email from within my
application. How can I do that? Please help


Nov 15 '05 #4
> >
System.Diagnostics.Process.Start("mailto:email@add ress?subject=mysubject");

FYI - the length of a URL is limited to 255 char's. If you need to pass a
large amount of data this approach won't work.

Eric Cadwell
http://www.origincontrols.com
Nov 15 '05 #5
We had a contractor implement a MailItem class using a URL. It wasn't until
much later that we realized the error of our ways.

We were also passing in the body as you showed:
string.Format("mailto:{0}?Subject={1}&Body={2}", this.To, this.Subject,
this.Body);

The body parameter in our case was 1000s of chars in length.

-Eric
Nov 15 '05 #6

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

Similar topics

7
3171
by: Evan Kontos | last post by:
I am using the window.open function to open a small window and I am using GET to get values back from that window. I want to be able to open another from the second window but I get an error...
1
3749
by: Display Name | last post by:
the customer I'm developing a site for uses a canned form-parsing page that allows her to have an email subscription opt-in page add emails to a list she can manage using a link that you point your...
4
11135
by: Ciar?n | last post by:
Hi all, I've go a little mailto: link on a page that when clicked opens an email form with the email address in the To field - all very simple. Problem is that in Netscape, a new blank window is...
2
7021
by: Dena Leiter | last post by:
I want to send people to a new page using a redirect but I want a new window to open. Is this possible? I've tried this: <meta http-equiv="refresh"...
2
1564
by: Richard Salit | last post by:
This seems like an easy question but I can't find the answer. How do I open a new browser window from my web application? I want to open the window and run a report in that window. Thanks,...
7
2702
by: mg | last post by:
I need to first open WebForm2 from WebForm1 and then close WebForm1 without the end user having to press an OK button before the close can occur. For example, possibly ...
2
2074
by: Matt Hamilton | last post by:
I have an application page with a datagrid with a checkbox on each row. The user should check the rows they want to modify and then click a button. When the button is clicked, I have a Click...
6
2834
by: Bernhard Straub | last post by:
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...
3
1742
by: =?Utf-8?B?VG9kZCBKYXNwZXJz?= | last post by:
Hey guys, I've got a C# Web Application written in .NET 2.0 in C#. I'd like to add a "Tree-View" component to the form so that they can easily select the "subject" of the form. However, I would...
0
2006
by: bbrewder | last post by:
I am struggling with some MSAccess automation issues. Basically, we have a .Net application that uses MSAccess for reporting (legacy code). We are able to launch MSAccess fine and even work with...
0
7252
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,...
0
7153
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...
0
5676
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,...
1
5077
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...
0
4743
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...
0
3230
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...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.