hi.. i really need your help . i am not able to send the email with the code below... pls advice me ..
Imports System.Net.Mail
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub btnSendemail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSendemail.Click
Dim smtpClient As New SmtpClient()
Dim message As New MailMessage()
Try
Dim fromAddress As New MailAddress("John00@hotmail.com", "crusher")
smtpClient.Host = "mail.smartedu.com"
smtpClient.Port = 25
message.From = fromAddress
message.[To].Add("hahaha@gmail.com")
message.Subject = "FeedbackTest"
message.IsBodyHtml = False
message.Body = "this is a test msg"
smtpClient.Send(message)
lblStatus.Text = "Email successfully sent."
Catch ex As Exception
Go to the complete details ...