Hi group,
I have the following code:
It works fine, but I want to use another smtp server and it use the TCP Port
5000
There is a way to change the default smtp port (25) with aditional code?
Thanks in advance.
Imports System.Web.Mail
Partial Class AddCasos
Inherits System.Web.UI.P age
Protected Sub Button1_Click(B yVal sender As Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim mailMessage As New MailMessage()
mailMessage.Fro m = TextBox1.Text
mailMessage.To = soporte@ccd.com
mailMessage.Sub ject = TextBox2.Text
mailMessage.Bod yFormat = MailFormat.Text
mailMessage.Bod y = TextBox3.Text
mailMessage.Pri ority = MailPriority.No rmal
SmtpMail.SmtpSe rver = "server05"
'mail server used to send this email. modify this line based on your mail
server
SmtpMail.Send(m ailMessage)
Response.Redire ct("casesend.as px")
End Sub
End Class
I have the following code:
It works fine, but I want to use another smtp server and it use the TCP Port
5000
There is a way to change the default smtp port (25) with aditional code?
Thanks in advance.
Imports System.Web.Mail
Partial Class AddCasos
Inherits System.Web.UI.P age
Protected Sub Button1_Click(B yVal sender As Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim mailMessage As New MailMessage()
mailMessage.Fro m = TextBox1.Text
mailMessage.To = soporte@ccd.com
mailMessage.Sub ject = TextBox2.Text
mailMessage.Bod yFormat = MailFormat.Text
mailMessage.Bod y = TextBox3.Text
mailMessage.Pri ority = MailPriority.No rmal
SmtpMail.SmtpSe rver = "server05"
'mail server used to send this email. modify this line based on your mail
server
SmtpMail.Send(m ailMessage)
Response.Redire ct("casesend.as px")
End Sub
End Class
Comment