473,394 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

send simple email with NET

Hi,

I want to send a simple mail with C#.
I have tried the following, but they don't work:
- some solutions on CodeProject websites.
- shellExecute(mailto:xx*@yyy.com?subject=aaa&body=b bb).

Thanks for help
TNL
Nov 16 '05 #1
5 4158

"Le, Thanh-Nhan" <le*****@freenet.de> wrote in message
news:eo**************@tk2msftngp13.phx.gbl...
Hi,

I want to send a simple mail with C#.
I have tried the following, but they don't work:
- some solutions on CodeProject websites.
- shellExecute(mailto:xx*@yyy.com?subject=aaa&body=b bb).

Thanks for help
TNL
Try http://blogs.axosoft.com/hamids/articles/152.aspx

Nov 16 '05 #2
Hi TNL

This has been addressed several times here.

I have compiled the common answer in my snippets page found at

http://www.publicjoe.f9.co.uk/csharp/snip/snip007.html

Hope this helps

Publicjoe
C# Tutorial at http://www.publicjoe.f9.co.uk/csharp/tut.html
C# Snippets at http://www.publicjoe.f9.co.uk/csharp/snip/snippets.html
C# Ebook at http://www.publicjoe.f9.co.uk/csharp/samples/ebook.html
VB Ebook at http://www.publicjoe.f9.co.uk/vbnet/samples/ebook.html
"Le, Thanh-Nhan" <le*****@freenet.de> wrote in message
news:eo**************@tk2msftngp13.phx.gbl...
Hi,

I want to send a simple mail with C#.
I have tried the following, but they don't work:
- some solutions on CodeProject websites.
- shellExecute(mailto:xx*@yyy.com?subject=aaa&body=b bb).

Thanks for help
TNL

Nov 16 '05 #3
thanks,
but I don't know, why it doesn't work. Error text:

An unhandled exception of type 'System.ComponentModel.Win32Exception'
occurred in system.dll
Additional information: Der angeforderte Abschnitt war im Aktivierunskontext
nicht vorhanden
(requested clause doesn't exist in activation context)

I use Outlook 2000 as standard email, I have tried to set Outlook express as
standard, but it doesn't work.

Do you have an idee?

Thanks
Nhan

"Mike Kitchen" <pu*******@hotmail.com> schrieb im Newsbeitrag
news:eH**************@TK2MSFTNGP12.phx.gbl...
Hi TNL

This has been addressed several times here.

I have compiled the common answer in my snippets page found at

http://www.publicjoe.f9.co.uk/csharp/snip/snip007.html

Hope this helps

Publicjoe
C# Tutorial at http://www.publicjoe.f9.co.uk/csharp/tut.html
C# Snippets at http://www.publicjoe.f9.co.uk/csharp/snip/snippets.html
C# Ebook at http://www.publicjoe.f9.co.uk/csharp/samples/ebook.html
VB Ebook at http://www.publicjoe.f9.co.uk/vbnet/samples/ebook.html
"Le, Thanh-Nhan" <le*****@freenet.de> wrote in message
news:eo**************@tk2msftngp13.phx.gbl...
Hi,

I want to send a simple mail with C#.
I have tried the following, but they don't work:
- some solutions on CodeProject websites.
- shellExecute(mailto:xx*@yyy.com?subject=aaa&body=b bb).

Thanks for help
TNL


Nov 16 '05 #4
You want to look at the System.Web.Mail namespace, in there there's a class
called SmtpMail that makes it all super easy.
http://msdn2.microsoft.com/library/System.Web.Mail.aspx

You can also read a blog I wrote about this:
http://dotnetjunkies.com/WebLog/john.../17/45329.aspx

--
John Wood
Blog: http://dotnetjunkies.com/weblog/johnwood
"Le, Thanh-Nhan" <le*****@freenet.de> wrote in message
news:eo**************@tk2msftngp13.phx.gbl...
Hi,

I want to send a simple mail with C#.
I have tried the following, but they don't work:
- some solutions on CodeProject websites.
- shellExecute(mailto:xx*@yyy.com?subject=aaa&body=b bb).

Thanks for help
TNL

Nov 16 '05 #5
Thanks,

I have downloaded your C# project. But "the file AssemblyInfo.cs could not
be opened", System can not find the file. I can't try your programm.

Otherwise, in my program "the System.Web.Mail namespace doesn't exist", it
can't not be compiled... Why?

Nhan
"John Wood" <sp**@isannoying.com> schrieb im Newsbeitrag
news:u$**************@TK2MSFTNGP12.phx.gbl...
You want to look at the System.Web.Mail namespace, in there there's a class called SmtpMail that makes it all super easy.
http://msdn2.microsoft.com/library/System.Web.Mail.aspx

You can also read a blog I wrote about this:
http://dotnetjunkies.com/WebLog/john.../17/45329.aspx

--
John Wood
Blog: http://dotnetjunkies.com/weblog/johnwood
"Le, Thanh-Nhan" <le*****@freenet.de> wrote in message
news:eo**************@tk2msftngp13.phx.gbl...
Hi,

I want to send a simple mail with C#.
I have tried the following, but they don't work:
- some solutions on CodeProject websites.
- shellExecute(mailto:xx*@yyy.com?subject=aaa&body=b bb).

Thanks for help
TNL


Nov 16 '05 #6

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

Similar topics

0
by: David Burson | last post by:
Hi, I have a VB.NET windows app that needs to automatically send a simple text email when my users run a new version of the app for the first time. I thought this would be simple, but after...
1
by: StevenBarnes | last post by:
I need to have some .Net code be able to send Email using my ISP's SMTP server. I found some articles on how to use the MAIL FROM: and RCPT TO: commands that you can stream to a tcp connection on...
1
by: Jay McGrath | last post by:
Help - trying to send a simple text email with with as little user intervention. I am trying to create a button in my Access application that will automatically send a simple text email. It...
9
by: Bob Jones | last post by:
We have developed a commercial ASP.net application (personal nutrition management and tracking); we want to send smtp email from within it. For our development box, we use WinXP Pro, IIS 5.5,...
10
by: Mike Charney | last post by:
Is there a simple way to send SMTP email from Access VBA? Mike m charney at dunlap hospital dot org
3
by: growse | last post by:
Right, I've got a 2 c# programs here. Lets call them A and B. My aim is to send a simple string from B to A. A is always running. I've overridden the WndProc method to give me messages that are...
3
by: YMPN | last post by:
Hi Everyone, I'm deen from Riyadh. Please do help me with some problem i have. I have this formview control setup to recieved inputs from user (textbox, dropdownlist, others). After...
2
by: Malli mindwave | last post by:
Hi, We are using the yahoowebHostiing service for my company website, In that one screen of the SendComments/FeedBack section is there, I'm basically dot.net develeoper ,but yahoowebhosting not...
6
by: =?Utf-8?B?TMOhemFybw==?= | last post by:
Hi everyone I've a simple ASP.NET Page that send a email using smtclient. The server is a Exchange and use my credentials to autentificated. The problem is that the send mail appear in the...
3
digicrowd
by: digicrowd | last post by:
http://bytes.com/images/howtos/applemail_sig_icon.jpg You can make your emails fancy in Mail.app by using Rich Text formatting or even included Stationery. But, a simple way to send your own HTML...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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...
0
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...

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.