SEND EMAIL FROM COMMAND LINE INSTRUCTIONS:
Command Line Smtp Commands
Server
Specify your e-mail server. e.g.--server smtp.mydomain.comPort
Smtp server port number, default is 25. e.g. gmail port:--port 465From
Your E-mail Address. e.g.--from myname@mydomain.com
Read from text file:--from "D:\from.txt"(since version 9.04.09)To
specify a recipient. e.g.--to myfriend@yahoo.com
Read from text file:--to "D:\to.txt"(since version 9.04.09)Username
Your Login username. e.g.--username myname
Read from text file:--username "D:\name.txt"(since version 9.04.09)Password
Your Login password. e.g.--password mypassword
Read from text file:--password "D:\pass.txt"(since version 9.04.09)Subject
E-mail Subject, which should be the short description of your e-mail content.
e.g.--subject "Good News"
Read from text file:--subject "D:\subject.txt"(since version 9.04.09)Text Body (\r\n means newline) Write the content anything you like.
e.g.--textBody "Hello,\r\nI'm David"
or read message from local text file:--textBody "D:\message.txt"
or read message from remote text file:--textBody "http://www.mydomain.com/message.txt"Html Body
Use HTML code to write the content. e.g.--htmlBody "Hello,\r\n I'm<b>David</b>..."Attachments
Add Attachments. e.g.--attachments "D:\info.doc" "D:\my pic.png"CC
“Cc” is an abbreviation of “Carbon Copy”. If you want someone, other than the direct recipients, to see your message, set those people’s e-mail addresses to the Cc field.
e.g.--cc "john@yahoo.com,donna@hotmail.com"
Read list of CC recipients from local text file(one line one email address):--cc "D:\My Customer.txt"
Read list of CC recipients from remote text file:--cc "http://www.mydomain.com/customer.txt"BCC
“Bcc” is an abbreviation of “Blind Carbon Copy”. It works exactly like Cc, but the e-mail addresses in Bcc field are not disclosed to recipients.
e.g.--bcc "john@yahoo.com,donna@hotmail.com"
Read list of BCC recipients from local text file(one line one email address):--bcc "D:\My Customer.txt"
Read list of BCC recipients from remote text file:--bcc "http://www.mydomain.com/customer.txt"SSL
SSL creates a secure encrypted connection between your email client application and email server.
e.g.--ssl trueor--ssl false, the default value is false.Authenticate
E-mail authentication is the effort to equip messages of the e-mail transport system with enough verifiable information, so that recipients can recognize the nature of each incoming message automatically.
e.g.--authenticate trueor--authenticate false. the default value is false.Just Print (since version 9.04.09)
--justPrint trueto print all parameters, but not actually execute them. This is a useful feature for learning this software.@cmdfile
Read arguments from cmdfile. e.g. SendEmail @cmdfileHelp
Output this help message:SendEmail --helpVersion (since version 9.04.17)
Output version message:SendEmail --versionExit (since version 9.04.17)
To exit program, type “exit” at the prompt:SendEmail --exitMan (since version 9.04.27)
Open web browser on manual page:SendEmail --manHome (since version 9.06.06)
Open web browser on home page:SendEmail --homeLog (since version 9.04.27)
Open Email Sent log file:SendEmail --log
send email from command line Examples
Please Note: Parameters that include spaces must be enclosed in quotes
Use textBody, port 465 (\r\n means new line):
SendEmail --textBody "Hello, \r\nI'm terry..." --server smtp.mydomain.com --port 465 --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News"Using htmlBody, ssl and authenticate:
SendEmail --htmlBody "Hello, I'm <b>terry</b>..." --ssl true --authenticate true --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News"Read the body of the message from local text file:
SendEmail --textBody "D:\my letter.txt" --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News"Read the body of message from remote text file:
SendEmail --textBody "http://software-download.name/ letter.txt" --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News"More Attachments:
SendEmail --attachments "D:\good.txt" "D:\my picuture.jpg" --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News" --textBody "hello, \r\n I'm David..."CC and BCC:
SendEmail --cc "john@blog.com,lucy@good.com" --bcc "ailsa@news.com,donna@earth.net" --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News" --textBody "hello, \r\n I'm David..."Read CC, BCC address from file(one line one email address):
SendEmail --cc "D:\customer.txt" --bcc "http://software-download.name/customer.txt" --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News" --textBody "hello, \r\n I'm David..."smtp.gmail.com
SendEmail --server smtp.gmail.com --port 465 --from myname@gmail.com --to terry@yahoo.com --username myname --password mypass --subject "Good News" --textBody "hello, \r\n I'm David..." --ssl true --authenticate truesmtp.mail.yahoo.com
SendEmail --server smtp.mail.yahoo.com --port 465 --from myname@yahoo.com --to terry@yahoo.com --username myname --password mypass --subject "Good News" --textBody "hello, \r\n I'm David..." --ssl true --authenticate trueRead from, to, username, password, subject from text file
SendEmail --from "D:\from.txt" --to "D:\to.txt" --username "D:\name.txt" --password "D:\pass.txt" --subject "D:\subject.txt" --server smtp.mydomain.com --port 25 --textBody "hello, \r\n I'm David..."Just Print all parameters, but not actually execute them
SendEmail --justPrint true --textBody "D:\my letter.txt" --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News"Read arguments from cmdfile
Usually, some parameters are invariant over many email sending processes. Typically settings like FROM address and name, SMTP server, character set, user name and password stays the same. In such cases it is possible to create configuration text file that includes all such invariant parameters and specify this file after @ sign, thus replacing the entire recurring part of command line.
first, create a text file contains arguments and save to software install directory, each line is identified by a line feed or carriage return and line feed combination.
Possible content of cmdfile.txt file, which is used to specify all email message parameters. Take a note on possibility to include reference to another configuration file that provides some other parameters.
\r\n in textBody or htmlBody will replace new line automatically.cmdfile.txt:
second, call from any software:--server smtp.mydomain.com --port 25 --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject Good News --textBody hello, \r\n I'm David... --ssl true --authenticate true --attachments D:\good.txt D:\my picuture.jpg --cc D:\customer.txt --bcc http://software-download.name/ customer.txt
Or run fromSendEmail @cmdfile.txtSendEmail>prompt:
Enclosed in quotes if path includes spaces:SendEmail> cmdfil.txt
SendEmail> "@D:\my path\cmdfil.txt"Overwrite settings as many as your want (since version 9.05.06)
Change the textBody setting:
SendEmail @cmdfile.txt --textBody "hello,\r\nTest message"Change the to, bcc setting:
SendEmail @cmdfile.txt --to friend@yahoo.com -bcc D:\bcc.txt
