Knowledgebase · Email
Sending email via ASP.NET 2.0
Last updated 2020-04-05
If you are moving to ASP.NET 2.0, you should know that the method of sending emails has changed slightly.
The following code has been tested on our server.
Dim MailObj As New System.Net.Mail.SmtpClient
MailObj.Host = "127.0.0.1" 'localhost could be used or mail.domain.name
Dim cred As New Net.NetworkCredential("authemail", "authpass")
MailObj.Credentials = cred
MailObj.Send("fromemail", "destemail", "subject", "body here")
The following code has been tested on our server.
Dim MailObj As New System.Net.Mail.SmtpClient
MailObj.Host = "127.0.0.1" 'localhost could be used or mail.domain.name
Dim cred As New Net.NetworkCredential("authemail", "authpass")
MailObj.Credentials = cred
MailObj.Send("fromemail", "destemail", "subject", "body here")
Tell us what you need
Compare available plans or describe your workload so we can discuss a suitable starting point.