I have used mailing in asp on local host which worked fine but The prob has occurred when i hosted the pages the error message is: Failure sending mail.
and the code i am using:
Dim message As New MailMessage message.From = New MailAddress("email@example.com") message.To.Add(New MailAddress("firstname.lastname@example.org")) message.Subject = test mail"" message.Body = "Hi you have got a test mail from me! Dim client As New SmtpClient client.Credentials = New System.Net.NetworkCredential("email@example.com", "xxxxxxx") client.Port = 587 client.Host = "smtp.gmail.com" client.EnableSsl = True client.Send(message)
Please help me!