i need to send an email from the company SMTP server but i need to go through proxy (because i am unable to connect to the internet unless i go through a proxy,the email server can send to the outside world, but i am trying to send from a the application server an email through the email server that i have, but the application server that i am using can access the outside world only through proxy), below is my code:
Imports System.Net.Mail
Imports System.Net
Dim mm As New System.Net.Mail.SmtpClient
mm.EnableSsl = True
mm.Host = "mail.company.net"
mm.Credentials = New NetworkCredential("user", "pass")
Dim w As New MailMessage()
w = New MailMessage()
w.Subject = "test"
Dim mailAddress As New System.Net.Mail.MailAddress("support@company.net", "Support")
w.From = mailAddress
Dim Em As New MailAddress("em@company.net")
w.To.Add(em)
w.IsBodyHtml = True
w.Body = sbody
mm.Send(w)
please can you help.