E
Esteban GN
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.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim mailMessage As New MailMessage()
mailMessage.From = TextBox1.Text
mailMessage.To = (e-mail address removed)
mailMessage.Subject = TextBox2.Text
mailMessage.BodyFormat = MailFormat.Text
mailMessage.Body = TextBox3.Text
mailMessage.Priority = MailPriority.Normal
SmtpMail.SmtpServer = "server05"
'mail server used to send this email. modify this line based on your mail
server
SmtpMail.Send(mailMessage)
Response.Redirect("casesend.aspx")
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.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim mailMessage As New MailMessage()
mailMessage.From = TextBox1.Text
mailMessage.To = (e-mail address removed)
mailMessage.Subject = TextBox2.Text
mailMessage.BodyFormat = MailFormat.Text
mailMessage.Body = TextBox3.Text
mailMessage.Priority = MailPriority.Normal
SmtpMail.SmtpServer = "server05"
'mail server used to send this email. modify this line based on your mail
server
SmtpMail.Send(mailMessage)
Response.Redirect("casesend.aspx")
End Sub
End Class