system.web.mail is missing

  • Thread starter Thread starter Steven
  • Start date Start date
Steven said:
Okay, what did I do wrong. system.web is present, but not
system.web.mail.

Any ideas?

The System.Web.Mail namespace has its implementation in the
System.Web.dll assembly. What exactly are you looking for?
 
Steven said:
I've installed .net framework sdk. I want to be able to e-
mail from within an application. The examples that I'm
seeing call for "imports system.web.mail". When I get to
system.web there is no mail namespace to be appended. Is
that about as clear as mud?

You need to add a reference to the System.Web.dll assembly.
 
John,

At the risk of being really stupid, isn't that exactly
what the imports statement does? When I try to use the
import statement with intellisense it sees its way down
to "system.web", but from there mail is not included. So
if I type it in anyway, the error message I receive
is "Namespace or type 'mail' for the 'System.Web.Mail'
cannot be found"

Sorry to be obtuse.

Steven
 
Steven said:
At the risk of being really stupid, isn't that exactly
what the imports statement does?

No, not at all - at least, the equivalent in C# doesn't. That makes the
*namespace* System.Web available so you don't need to write full
typenames out. That's not the same thing as referencing the *assembly*
System.Web.dll, which happens to contain classes in System.Web and
System.Web.Mail (amongst others).

Assuming you're using VB.NET from Visual Studio .NET, go to the
solution explorer and you'll see an item called "References" under your
project. Right-click that and select "Add reference". Add a reference
to System.Web.dll and all should be well.
 
-----Original Message-----


No, not at all - at least, the equivalent in C# doesn't. That makes the
*namespace* System.Web available so you don't need to write full
typenames out. That's not the same thing as referencing the *assembly*
System.Web.dll, which happens to contain classes in System.Web and
System.Web.Mail (amongst others).

Assuming you're using VB.NET from Visual Studio .NET, go to the
solution explorer and you'll see an item called "References" under your
project. Right-click that and select "Add reference". Add a reference
to System.Web.dll and all should be well.

--
Jon Skeet - <[email protected]>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.
 
Back
Top