Hi,
I have a page that send confirmation email after clicking the submit button.
The code works fine on my local machine that is connected to the live database on the provider's server: eg:
http://locoalhost/registration_form.aspx and send/ receive emails to my account.
But when I go to the live site
http://livesite/registration_form.aspx
It give me error messages that can not stablish connection to the mail server?!!!
Is there anything wrong with the code?
__________________________________________
Dim UN_email as string = "
[email protected]"
'Dim SP_email as string = ""
Dim MessageBody as string = " Thanks "
Dim EmailBody as String
Dim objEmail as New Mail.MailMessage()
objEmail.To= client_email.Text
objEmail.From = UN_email
'objEmail.Cc = SP_email
objEmail.Subject = "thanks"
EmailBody = ""
EmailBody &= "This is a notification email."
objEmail.Body = EmailBody
objEmail.BodyFormat = MailFormat.Html
SmtpMail.SmtpServer = "mail.kk.nz"
System.Web.Mail.SmtpMail.Send(objEmail)
objEmail.Priority = MailPriority.High
SmtpMail.SmtpServer = "mail.kk.nz"
SmtpMail.Send(objEmail)
__________________________________________________
__________________________________________________ _____