Console app to send emails
This app uses SendGrid.com to send emails.
Add file \EmailSenderConsoleApplication\EmailSenderConsoleApplication\PrivateSettings.config
values in this file overrides values in App.config
PrivateSettings.config
<appSettings>
<add key="DefaultEmailFrom" value="[email protected]"/>
<add key="DefaultEmailTo" value="[email protected]"/>
<add key="SendGridUserName" value="SECRET_USER_NAME"/>
<add key="SendGridPassword" value="SECRET_PASSWORD"/>
</appSettings>
EmailSenderConsoleApplication.exe -file "..\..\templates\invoice.html" -email "[email protected];[email protected]" -subject "Test email - cmdline"
EmailSenderConsoleApplication.exe "..\..\templates\invoice.html"
EmailSenderConsoleApplication.exe -help
If any named parameter is not used, then default value from configuration is taken.