Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Where do I store email settings?

$
0
0

Finally making the switch from forms to razor pages...   I used to store my email settings in the web.config 

<mailSettings><smtp deliveryMethod="Network" from="xxxx@gmail.com"><network defaultCredentials="false" host="smtp.gmail.com" port="587" userName="xxxx" password="xxxxxx" /></smtp></mailSettings>

I have created a contact form that works but I really would like to store settings in a better location.  I'm using 'System.Net.Mail;' to create the form.

Where and how can I store these in a MVC Razor Pages app?

Thanks!!!!


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>