Help for Visual web dev isolate system.web.mail to system.net.mail


Hi all,
 I'm new user to visual web developer express software. Laterly i found this application isolate quite some of the component namespace, like system.web.mail to net.mail.
I not well understand how system.net.mail functional?? Does it act same as system.web.mail??
My coding below: change system.web.mail to system.net.mail which causing a lot error...
*****Can anybody correct me or advise me how to make this code work in system.net.mail??????
< Namespace="System.net.Mail" %>
<script runat="server">
    Public FromAddress As String = ""
.......  
    Function SendEmail() As Boolean
        Try
        
            Dim oMessage As MailMessage = New MailMessage
                      
           
            oMessage.From = FromAddress (**error: value of string cannot convert to system.net.mail.mailmessage
            oMessage.To = ToAddress (**error: To is ReadOnly)
            oMessage.Subject = MessageSubject
            oMessage.Body = MessageBody
            oMessage.bodyformat = MailMessage.IsBodyHTML (**Error: Bodyformat not member of system.net.mail)
           
           
            'send email require local mail server available
            SmtpClient.SmtpServer = "localhost" (** error: smtpserver is not membr of system.net.mail)
           
            SmtpClient.Send(oMessage)
            'smtpmail.send(oMessage) --(**error: smtpmail is obsolate. System.net.mail recommend smptclient)
            Return (True)
Cheers:)
0
carinaloh
11/22/2006 4:34:07 PM
📁 asp.net.web-forms
📃 93655 articles.
⭐ 6 followers.

💬 1 Replies
👁️‍🗨️ 1415 Views



Most of your answers can be found at www.systemwebmail.com.
Jeff

Please:  Don't forget to click "Mark as Answer" on the post that helped you.  That way future readers will know which post solved your issue.
0
jeff
11/22/2006 7:22:44 PM
Reply: