Hi Guys
I have been gettign the following error "Unable to read data from the transport connection: net_io_connectionclosed." when attempting to send an email using SMTPCLient.
The company who previously provided us with out mail server have just merged with another company, where they require what looks to be a second level of authentification.
within MS outlook there is now a requirement for the settings as follows moresettings>OutgoingServer SMTP logOn using an additional username & password in conjunction with the email accoutn username & password.
This is the following code I have with the SSL enable and Port 465 beign used. this is also different from previous Email server provider.
Dim _SMTPServer As New SmtpClient
_SMTPServer = New SmtpClient("myNewHost", 465)
' Default
_SMTPServer.Credentials = New _
Net.NetworkCredential("mydomain.net", "mypassword")
_SMTPServer.EnableSsl = True
Dim _objMail As MailMessage
_objMail = New MailMessage()
' _objMail.IsBodyHtml = True
_objMail.From = New MailAddress("myOutgoingAddress@mydomain.net")
_objMail.To.Add("blah@yahoo.co.uk")
_objMail.Subject = "TEST EMAIL"
_objMail.Body = "HOWDY"
_SMTPServer.Send(_objMail)
Any advice on this appreciated.
Thanks
I have been gettign the following error "Unable to read data from the transport connection: net_io_connectionclosed." when attempting to send an email using SMTPCLient.
The company who previously provided us with out mail server have just merged with another company, where they require what looks to be a second level of authentification.
within MS outlook there is now a requirement for the settings as follows moresettings>OutgoingServer SMTP logOn using an additional username & password in conjunction with the email accoutn username & password.
This is the following code I have with the SSL enable and Port 465 beign used. this is also different from previous Email server provider.
Dim _SMTPServer As New SmtpClient
_SMTPServer = New SmtpClient("myNewHost", 465)
' Default
_SMTPServer.Credentials = New _
Net.NetworkCredential("mydomain.net", "mypassword")
_SMTPServer.EnableSsl = True
Dim _objMail As MailMessage
_objMail = New MailMessage()
' _objMail.IsBodyHtml = True
_objMail.From = New MailAddress("myOutgoingAddress@mydomain.net")
_objMail.To.Add("blah@yahoo.co.uk")
_objMail.Subject = "TEST EMAIL"
_objMail.Body = "HOWDY"
_SMTPServer.Send(_objMail)
Any advice on this appreciated.
Thanks