Last post Sep 08, 2008 05:17 AM by Thomas Sun – MSFT
Sep 03, 2008 11:55 AM|Flintronics|LINK
I am wondering what are the default server address and port number that are used in VS .Net 2003. I am porting an application and i can't that information anywhere. I know it's specified in code or web.config in VS 2005.
Also, when i run the application and send email through it, it works even when port 25 (local SMTP server is running on) is blocked?? How is that possible? I also received the mail fine.
Thank you for your help.
Sep 03, 2008 01:11 PMfirstname.lastname@example.org|LINK
I am wondering what are the default server address and port number...
This is entirely dependent on your setup, there are no defaults. The customary port is 25, and the IP address is whatever IP address your SMTP server uses. Contact you mail admin for help with these.
Sep 03, 2008 02:04 PM|Flintronics|LINK
Hello, the SMTP server is hosted on the same computer as the application. Will the .net 2003 just use those? Port and server name (IP) doesn't need to be explicitly specified?
In VS 2005, it won't let you compile without specifying the server name in the code. Thanks for you reply, btw.
Sep 08, 2008 05:17 AM|Thomas Sun – MSFT|LINK
If we don't specify the SMTP server, the name of the local SMTP server is used. We can use SmtpMail.SmtpServer to set SMTP server in code (http://msdn.microsoft.com/en-us/library/system.web.mail.smtpmail.smtpserver(VS.71).aspx).
If your SMTP server is behind a firewall that blocks any direct SMTP traffic (through port 25), you'll need to find out if there is a smart host available on your network that is allowed to relay all SMTP messages to the Internet. For more information,
I look forward to hearing from you.