how to send mail through vb.net ?
-
i m making an application in wich i need to send mail can anyone plz help me remember there is no namespace "system.web" and there is no class smtpmailmessage in vb.net plz help a code will be more helpful
System.Web.Mail.SmtpMail.Send is what you need. What do you mean there is no System.Web namespace ? Of course there is. Christian Graus - Microsoft MVP - C++
-
i m making an application in wich i need to send mail can anyone plz help me remember there is no namespace "system.web" and there is no class smtpmailmessage in vb.net plz help a code will be more helpful
Make sure you have the proper DLL referenced in your project or the Import statement will not work.
George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things." Jörgen Sigvardsson wrote: If the physicists find a universal theory describing the laws of universe, I'm sure the asshole constant will be an integral part of that theory.
My Blog[^]
-
System.Web.Mail.SmtpMail.Send is what you need. What do you mean there is no System.Web namespace ? Of course there is. Christian Graus - Microsoft MVP - C++
-
this i valid namespace in c# but in vb.net there is no namespace with this name. u can try it out
You're very mistaken. All you have to do is add a Reference to the System.Web .DLL and the namespace will work. C# has to do the exact same thing. As a matter of fact, ALL the managed languages under .NET have to do this to get access to the System.Web namespace. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
this i valid namespace in c# but in vb.net there is no namespace with this name. u can try it out
Yeah, I thought you may have forgotten the reference. Christian Graus - Microsoft MVP - C++
-
You're very mistaken. All you have to do is add a Reference to the System.Web .DLL and the namespace will work. C# has to do the exact same thing. As a matter of fact, ALL the managed languages under .NET have to do this to get access to the System.Web namespace. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
You don't have to locate the file. Just right-click the References folder, then click on Add Reference. When the dialog shows up, it'll list, on the .NET tab, all the .NET components in the GAC. Scroll down the list and you'll find System.Web.dll. Double-click it, then click OK. You can then use the Imports statement to import the namespaces you need. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome