Sending SMTP E-mail from a VB.NET App

Joined
Jul 5, 2006
Messages
9
Programming Experience
1-3
Hi Guys,

I am trying to send SMTP e-mail from my VB.NET App. Doing some digging around it appears I should be able to do this by using:

System.Web.Mail

However when I try to declare an object of this type it does not recognise this type. I can find System.Web but "Mail" is not a component of Web.

I am developing this on my laptop which does not appear to have CDO.sys installed. I am guessing that this component is made available through CDO..

Do I need CDO installed to use this component? If this is the case does anyone know where I can get hold of it?

Any help is as always greatly appreciated.

Cheers,

Chris
 
As i understand it the .net 1.x system.web.mail namespace uses cdo.sys, in .net 2.0 it doesn't but probably some other form of com+ But does that explain why you cant access the namespace?, dunno.
 
check this out but be aware about this part:
import the System.Web.Mail namespace (one which provides the classes for sending email) and then in the general section, declare required variables ...

You can do that by adding reference: Project - > add reference - > locate "System.Web" and click OK
Now just add this line:
Imports
System.Web.Mail
Actually it will be easier to follow up this thread:

http://www.dotnetrooms.com/showthread.php?t=23&highlight=email

Regards ;)
 
Back
Top