Body of an html email is stored in path/email.html to be sent to [email protected] and [email protected] with subject Hello world
Username: [email protected]
Password: 123456
Open a new shell (PowerShell if windows), go to the folder where the repo was cloned to and execute any of the following
node send --user [email protected] --pass 123456 --to [email protected] [email protected] --subject "TEST mail" --body "path/email.html"
node send -u [email protected] -p 123456 -t [email protected] [email protected] -s "TEST mail" -b "path/email.html"
node send -u [email protected] -p 123456 -t [email protected] -t [email protected] -s "TEST mail" -b "path/email.html"
-
Username:
--useror-uUsername. Required. Must be a valid email ID. If variable is absent, environment variable MGUSERNAME is used
-
Password:
--passor-pPassword. Required. If variable is absent, environment variable MGPASSWORD is used
-
Service:
--serviceDefault value is "Mailgun". List of supported services are here
-
Proxy Server:
--proxyIf variable is absent, environment variable HTTP_PROXY is used. The proxy server must support SMTP transport
-
To:
--to -tRecipients. At least one is required
-
Cc:
--cc -c -
Bcc:
--bcc -
Subject:
--subject -s -
ReplyTo:
--replyTo -rReplyTo address. If present, must be a valid Email ID
-
From:
--from -fMust be a valid email ID. Default value is the Username
-
Name:
--name -nSender's displayed name
-
Body:
--body -bBody of the mail. Must be a valid file path.
-
Headers:
--headers -hAdditional mail headers. The string must be JSON. For example:
--headers "{`"X-Mailgun-Campaign-Id`":`"foobar`"}" -
List:
--list -lList headers. The string must be JSON. For example:
--list "{`"unsubscribe`":`"%unsubscribe_email%`"}" -
Text Mode:
--textIf variable is present, mail will be sent as text message and not HTML
-
Debug Mode:
--debugTurn on debugger mode
KGP's proxy server will not work with this because it doesn't support some necessary features for SMTP transport