'System.Web.Mail.SmtpMail.Private Sub New()' is not accessible in this context because it is 'Private'.
I get the message: 'System.Web.Mail.SmtpMail.Private Sub New()' is not accessible in this context because it is 'Private'.
This is my code:
Line 2: <%@ Import NameSpace="System.Web.Mail.SmtpMail" %>
Line 3: <%
Line 4: Dim objSMTP as New System.Web.Mail.SmtpMail()
Line 5: Dim ret as object
Line 6: objSMTP.Send("[email protected]","[email protected]", "Demo ASP Mail Header", "Demo ASP Mail Body")
How do I make it public?
Thanks,
Bobby
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Infonomics3 reputationPosted Nov 11, 2004, 11:19 AM EST
<%@ Import NameSpace="System.Web.Mail.SmtpMail" %> <% Dim objSMTP as System.Web.Mail.SmtpMail Dim ret as object objSMTP.Send("[email protected]","[email protected]", "Demo ASP Mail Header", "Demo ASP Mail Body") %>