Question: 'System.Web.Mail' namespace not found

V

VB Programmer

I'm trying to send an email from my VB.NET application.

From the examples I've seen everyone imports 'System.Web.Mail' first. But,
when I type 'import System.Web.Mail' the editor says it can't find the
namespace. The message is: "Namespace or type 'mail' for the Imports
'System.Web.Mail' cannot be found." Any ideas?

Thanks.
 
V

VB Programmer

I get the same error and squiggly blue line when I try to import that too.

Any idea? Thanks.
 
J

Jan Tielens

You have to add a reference before you try to import it!
In VS.NET: Project menu: Add Reference
Choose the desired dll.
 
H

Herfried K. Wagner [MVP]

* "VB Programmer said:
From the examples I've seen everyone imports 'System.Web.Mail' first. But,
when I type 'import System.Web.Mail' the editor says it can't find the
namespace. The message is: "Namespace or type 'mail' for the Imports
'System.Web.Mail' cannot be found." Any ideas?

Add a reference to "System.Web.dll" through the solution explorer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top