Add reference first
Imports System. Net. Mail
Dim client As New System. Net. Mail. SmtpClient ()
Client. Host = "smtp.163.com"
Client. usedefacrecredentials = False
Client. Credentials = New System. Net. NetworkCredential ("Your 163 email address", "password ")
Client. DeliveryMethod = System. Net. Mail. SmtpDeliveryMethod. Network
Dim message As New System. Net. Mail. MailMessage ("Your 163 email address", "recipient email address ")
Message. Subject = "topic test"
Message. Body = "asp.net send mail"
Message. BodyEncoding = System. Text. Encoding. UTF8
Message. IsBodyHtml = True
'Add an attachment (the attachment must be uploaded to the server first)
Dim data As New System. Net. Mail. Attachment ("Upload \ File1.rar", System. Net. Mime. MediaTypeNames. Application. Octet)
Message. Attachments. Add (data)
Try
Client. Send (message)
Response. Write ("Email successfully send .")
Catch ex As Exception
Response. Write ("Send Email Failed." + ex. ToString ())
End Try