We are moving certain background methods that send emails to Azure functions. Our emails are currently built and sent using Postal
Postal uses .NET Frameworkâs built-in SmtpClient, which has connection details defined in a web.config file for our MVC web app, which doesn't exist in an Azure Function.
Is there a way to use Postal in an Azure Function?
If you look at the source code of the project on GitHub, you'll see that Postal's EmailServer takes in a Func. If you don't provide it, it creates an SmtpClient by executing the
new SmtpClient()constructor, which pulls configuration in from the .config file. So if you want avoid using a .config file to get the settings, pass in a Func.