How to set smtp mail settings in web.config file – Asp.Net

Setting smtp settings for sending email messages in each function can be difficult. Why do we need to do that as we can set this inside web.config like below. It should be written inside <configuration> section.

It is simple right ?. Now we dont need to provide smtp settings for smtp client when we are initializing it for each function.

Cheers,

2 thoughts on “How to set smtp mail settings in web.config file – Asp.Net

Leave a Reply to User Cancel reply

Your email address will not be published. Required fields are marked *