473,699 Members | 2,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Emailing From a Windows Application

Hey folks,

I've got a C# Windows application that needs the ability to send emails. It
should behave the same way as when you click on a mailto link through a web
browser (i.e. open up the user's default mail client and start a new email).

How would I do that in a Windows C# application? It must be compatible with
Outlook 97-2003.

Thanks a lot!
Nov 16 '05 #1
3 3508
John, take a look at the System.Web.Mail namespace. It contains all the
classes you need, and you can use them in Windows forms apps as well.

--
Kai Brinkmann [MSFT]

Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"John Smith" <js@no.com> wrote in message
news:OE******** *****@TK2MSFTNG P11.phx.gbl...
Hey folks,

I've got a C# Windows application that needs the ability to send emails.
It
should behave the same way as when you click on a mailto link through a
web
browser (i.e. open up the user's default mail client and start a new
email).

How would I do that in a Windows C# application? It must be compatible
with
Outlook 97-2003.

Thanks a lot!

Nov 16 '05 #2
Thx. Actually though, everything I've read states that the System.Web.Mail
Namespace can not open your default mail client and behave like the mailto
link.

I did find what I was looking for though. For all you future google
searchers:
System.Diagnost ics.Process.Sta rt(string.Forma t("mailto:{0}?S ubject={1}&Body =
{2}", "me*******@meEm ail.com", "Me Subject", "Me Body"));

Thanks for the help though Kai.
"Kai Brinkmann [MSFT]" <ka******@onlin e.microsoft.com > wrote in message
news:uw******** ******@TK2MSFTN GP14.phx.gbl...
John, take a look at the System.Web.Mail namespace. It contains all the
classes you need, and you can use them in Windows forms apps as well.

--
Kai Brinkmann [MSFT]

Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.

"John Smith" <js@no.com> wrote in message
news:OE******** *****@TK2MSFTNG P11.phx.gbl...
Hey folks,

I've got a C# Windows application that needs the ability to send emails.
It
should behave the same way as when you click on a mailto link through a
web
browser (i.e. open up the user's default mail client and start a new
email).

How would I do that in a Windows C# application? It must be compatible
with
Outlook 97-2003.

Thanks a lot!


Nov 16 '05 #3
Sorry to hijack the thread, but just a couple of questions... I tried using
the System.Web.Mail namespace, and found it to work, but with a couple of
reservations: it only worked on a PC that had IIS (with SMTP) installed, and
setting the SmtpServer property beforehand had no effect (I was curious to
see this is a static method!?). If I stopped IIS, then the SendMail didn't
throw an exception, but the mail never got there - but it then came through
when I started the IIS server again!
Is there any pointers on how to do it operating off the SMTP server of a
remote machine running IIS?

"Kai Brinkmann [MSFT]" wrote:
John, take a look at the System.Web.Mail namespace. It contains all the
classes you need, and you can use them in Windows forms apps as well.

--
Kai Brinkmann [MSFT]

Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"John Smith" <js@no.com> wrote in message
news:OE******** *****@TK2MSFTNG P11.phx.gbl...
Hey folks,

I've got a C# Windows application that needs the ability to send emails.
It
should behave the same way as when you click on a mailto link through a
web
browser (i.e. open up the user's default mail client and start a new
email).

How would I do that in a Windows C# application? It must be compatible
with
Outlook 97-2003.

Thanks a lot!


Nov 16 '05 #4

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

Similar topics

9
10955
by: Bill | last post by:
I am trying to have the capability to email attachments. Specifically I want to be able to email a specific attachment that I name that may be a PDF document, text doc, etc. I already have a working piece of code that emails jpg attachments but does not work with any other types of attachments. Could someone tell me how to modify this code to send other types of attachments like the one's stated above(especially PDF's)? Also how do I...
2
1202
by: Ganesh | last post by:
Hi All, Right now I am bogged down by an error message which I am not able to fix as there are no straight forward solutions to be found in the Internet. I thank you all in advance for your precious time. I apologize if this is not the correct place to put my query. I have an ASP.Net (C#) application. I have a forgot password page where I need to send the user authentication details through email. I use the
2
1538
by: Stanley Cheung | last post by:
Hi all, I am developing the application for send emailing list, actually, i can perform to send a email 1 by 1 and do it on aspx page. I have a enquiry that how can the application change to background task instead of user need to wait and wait until all email sent. Also, when user waiting to complete the emailing list, the page is blank and nothing, can we put a layout when user waiting a request.
3
3033
by: tafs7 | last post by:
My code below is supposed to email me when an error occurs on the application, but it's not emailing anything. Am I missing something? I know the smtp servers I've tried work. I even added a App_Start handler to see if I could get emailed at all even from the first request of the app, but to no avail. Could someone please help me out? Thanks a lot! --Thiago Web developer AgniTEK
4
1651
by: Mike Moore | last post by:
What is the best way to launch outlook from an asp.net web page? Can you do this using MAPI or is there a control that you can purchase? We are unable to use SMTP. We use MS Exhange and MAPI currently for our client/server apps.
1
1795
by: John Smith | last post by:
Server: Windows 2000 ..Net Framework: v1.1.4322.573 I have created a class in asp.net that sends out an email message. It used to work on the live server but now it doesn't? I never made any changes to the application. So, I tried using the application from my machine (development server) and it works fine. I setup both to use the exact same SMTPServer as "mail.whatever.com" and still the developer server works but the live server...
5
4905
by: Shaan | last post by:
Hi Everybody, I am incorporating emailing feature in my VB.Net application. The code is as below. When I send email to some XYZ@buffalo.edu, it sends the email successfully, but when I send it to someone@hotmail.com, it gives the error message "Err: 553, Domain isn't in my list of allowed rcpthost" . Can you pls throw some light on this.. and give me solution..thanx in advance.
2
2234
by: Tim Hunter | last post by:
I have two questions regarding emailing from Access. My first question relates to how many email addresses is too much. I have a client who wants to email 1500 people at once. Is this possible or smart? what would be a reasonable number? My second question is related to emailing customers who have an anniversary or a Birthday. Is it possible to personalize each email with a name? TIA Tim
1
3272
by: =?Utf-8?B?U2FpIFZhamph?= | last post by:
Hi I am trying to send a .pdf document as an email attachment using net.mail. This email is being sent by a windows service application. After i receive the email, and when i try to open the attachment, i get the following error message... "adobe reader could not open <filenamebecuase it is either not a suppported file type or because the file has been damaged(for example, it was sent as an email attachment and wasn't correctly...
0
8685
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
8613
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
9172
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
9032
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...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7745
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
3054
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 we have to send another system
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.