why is this email not sending

d2005

Active member
Joined
Aug 31, 2005
Messages
37
Location
ireland
Programming Experience
Beginner
setting up the email to send email when a button is clicked

check it out, no errors but no email either

VB.NET:
 Private Sub CompRegConfirmation() 

Dim msg As New MailMessage

msg.From = "localhost"

msg.To = "someone@hotmail.com"

msg.Subject = " Company registered"

msg.Body = txtUsername.Text

msg.BodyFormat = MailFormat.Html

SmtpMail.SmtpServer = "localhost"

SmtpMail.Send(msg)

End Sub

i call this then in a button click event
compregconfirmation()

no joy
 
Back
Top