Hello! I was just wondering if there is a way to send an email to whoever you want with whatever the email account is. Right now i've got :
Try
Dim mail As New MailMessage()
Dim SmtpServer As New SmtpClient
SmtpServer.Credentials = New Net.NetworkCredential("user", "pass")
SmtpServer.Port = 587
SmtpServer.Host = "smtp.gmail.com"
SmtpServer.EnableSsl = True
mail.To.Add("userto")
mail.Subject = "subject"
mail.From = New MailAddress("user")
mail.Body = TextBox1.Text
SmtpServer.Send(mail)
MsgBox("Your Feedback has been successfully sent!", MsgBoxStyle.Information, "Thank You")
TextBox1.Clear()
Catch ex As Exception
MsgBox("Check your network connection. Seems that you're not connected to it. Try again later.", MsgBoxStyle.Critical, "Error")
End Try
But the thing is that it's only GMAIL. I cant send emails through hotmail, yahoo etc. Is there a way I can send emails no matter what the provider is?