Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 965 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 965 Bytes

EmailSenderConsoleApplication

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>  

You can use it like this:

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.