The current settings for the email server is checked into version control.
<configuration>
<system.net>
<mailSettings>
<smtp deliveryMethod="network">
<network host="..." port="25" password="..." userName="..." />
</smtp>
</mailSettings>
</system.net>
</configuration>
I'd like to remove (at least the password) from version control so other developers can't (accidently) send mail over our mail server.
We're using a SAAS provider for our outbound email, because of this I cannot limit access to this server by setting up a firewall. The only authentication is using username and password provided by the SAAS provider.
Is it possible to have the mailSettings be set from the Application settings blade in Azure. This way I can remove the password from version control and do not need to manually update the web.config upon (automatic) deployment.
As you mentioned you are using Postal. On their GitHub, I notice you can provide a function that creates a SmtpClient.
Starting from there, you can create a custom SmtpClient that will be built using application settings:
This way you'll be able to modify your email settings in the Application settings of your Azure App Service.