reading smtp port from IIS settings
In my web.config file I have specified settings for sending mail. In particular I have these settings:
<system.net>
<mailSettings>
<smtp>
<network host="smtp.example.com" port="25" userName="user" password="pass"/>
</smtp>
</mailSettings>
</system.net>
Now the problem is t开发者_JAVA百科hat my isp suddently (without warning of course) have decided to block port 25 meaning I have to change to port 26 in my development envoiremnet. I belive the best way would be to change to port 26 in the IIS manager (this way I do not need to change anything when publishing my webapp to the remote server).
But how do I tell my asp.net webapp to use the default IIS setting?
check port no 587 its also use for smtp because most of ISP and web hoster block port 25 for security reason.
精彩评论