473,748 Members | 6,161 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 3511
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
10957
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
1205
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
1539
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
3036
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
1652
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
1799
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
4907
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
2239
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
3274
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
8828
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,...
1
9319
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
9243
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...
1
6795
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
6073
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
4599
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...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3309
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
3
2213
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.