We help IT Professionals succeed at work.

ASP.net SMTP Port

masdf123
masdf123 asked
on
Hello Guys,

I am trying to send mail out using my SMTP server which is using port 29,

How can I make I application use SMTP on port 29.
Thanks
Comment
Watch Question

Top Expert 2015
Commented:
You can specify in coding:
            SmtpClient client = new SmtpClient(server, port);
Or if you are pulling from web.config:
<system.net>
            <mailSettings>
                  <smtp>
                        <network       host="smtp.gmail.com"
                               port="29" userName="myEmail@gmail.com" password="myPassword" />
                  </smtp>
            </mailSettings>
</system.net>