Question sending email

Rainny

Member
Joined
Jun 9, 2008
Messages
16
Programming Experience
Beginner
Hi, I have some question about send the e-mail through the application. The below is the coding, but it only can send to the C:\Inetpub\mailroot\Queue folder. It does not send out the mail through the internet. Could anybody tell me why?
Thanks lot.
Protected Sub SendEmail_Click(ByVal sender As Object, ByVal e As EventArgs) Handles SendEmail.Click

Const ToAddress As String = "your e-mail address"


Dim mm As New MailMessage(UsersEmail.Text, ToAddress)

mm.Subject = Subject.Text
mm.Body = Body.Text
mm.IsBodyHtml = False

Dim smtp As New SmtpClient


smtp.Send(mm)
 
Back
Top