I've developed an application in asp.net MVC.
My application sends a mail using my smtp server.
It works fine in my local PC/network, But when I send mail using my web server (my website is hosted in godaddy.com), I get the following error:
Error: Insufficient permissions for setting the configuration property 'port'. (D:\Hosting\6295866\html\web.config line 177)
My web.config file settings are as follow:
<configuration>
<system.net>
<mailSettings>
<smtp from="vikas.patel@sufalamtech.com" deliveryMethod="Network">
<network host="mail.sufalamtech.com" port="2626" defaultCredentials="false" password="mypassword" userName="vikas.patel@sufalamtech.com" />
</smtp>
</mailSettings>
</system.net>
</configuration>
My SMTP server use the 2626 port to send email.
Best Answer
To send mail via GoDaddy, I think you need to send via their SMTP server address relay-hosting.secureserver.net on port 25, and make sure you have a valid from address.
https://stackoverflow.com/questions/1360214/cannot-send-email-in-asp-net-through-godaddy-servers