Click here to Skip to main content
15,895,256 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am a novice at programming.

Trying to write a small program that will send out an email.

However, the Imports System.Web.Mail generates a "Namespace does not contain a public member...etc"

Googling this problem indicates that I need to add a reference...System.Web.dll which I think I have done through Project > Reference and adding System.Web to the reference list.

But I still get the error message. Any thoughts on what I am doing wrong??

Thanks
Gary Vogel
Posted
Updated 20-Sep-10 5:59am
v3

Use

Imports System.Net.Mail
 
Share this answer
 
Comments
Simon_Whale 20-Sep-10 11:59am    
further to Toni's advise a good reference site is http://weblogs.asp.net/scottgu/archive/2005/12/10/432854.aspx
GaryV100 20-Sep-10 12:07pm    
Reason for my vote of 5
Automatic vote of 5 for accepting answer.
Thanks!! I will give that a try.
But, I am curious...any thoughts on why adding the reference did not allow System.Web.Mail to work??
Thanks again
Gary Vogel
 
Share this answer
 
Comments
Toniyo Jackson 29-Sep-10 2:20am    
System.Web.Mail is used in older version .Net 2.0.
System.Net.Mail is the latest version.
So some function will not support with old one.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900