Skip to content

Console

Vijay Santhanam edited this page Apr 5, 2017 · 2 revisions

Console Application

Included with the library is the EmailSender.Console project. A simple console application for sending mail from the command line.

When you run EmailSender.Console.exe, the following help message is displayed.

================================================================================

usage: EmailSender <sender type> {parameter=value}

required parameters: to, subject, from, message

sender type  | required parameters                  | optional parameters
--------------------------------------------------------------------------------

MockSender   |                                      |
SmtpSender   | hostname                             | Port,Hostname,EnableSsl,A
                                                      syncSend,Timeout,Domain,U
                                                      serName,Password
GmailSender  | accountEmailAddress,accountPassword  | Port,Hostname,EnableSsl,A
                                                      syncSend,Timeout,Domain,U
                                                      serName,Password

Example

EmailSender.Console GmailSender accountEmailAddress=george.castanza@gmail.com accountPassword=bosco Port=485 to=jerry@seinfeld.com from=george.castanza@gmail.com "subject=serenity now!" "message=insanity later"

NOTE The quotation marks surround both the parameter name and value to accomodate spaces

Clone this wiki locally