Usage: mtcmail OPTION [VALUE] […]
Version: 1.1
Copyright 2012 by MacTechnologies Consulting. All rights reserved.
Send a single e-mail to one or more recipients.
OPTIONS
-f, --from The address of the sender. (required)
-t, --to The address of a TO recipient. Multiple uses will add
multiple addresses. (required unless there is at least
one bcc and no cc addresses specified)
-c, --cc The address of a CC recipient. Multiple uses will add
multiple addresses. (optional, but requires a TO
address if used)
-b, --bcc The address of a BCC recipient. Multiple uses will add
multiple addresses. (optional)
-s, --subject The SUBJECT of the e-mail. (optional)
-m, --server The address or IP of the SMTP SERVER. Defaults to
127.0.0.1.
-p, --port The PORT of the SMTP server. Defaults to 25.
-U, --username [] The authentication USERNAME for the SMTP server.
Skipping will clear the username. (optional)
-P, --password [] The authentication PASSWORD for the SMTP server.
Skipping will clear the password. (optional)
-X, --secure [] Use a secure connection to the server. Without the
switch, the default is “none”. If no type is
specified, the default is “any”, which means that some
security is required. If “opt”, SSLv3/2 will be tried,
followed by TLSv1, followed by no security at all. The
acceptable values are [none | opt | any | sslv3/2 |
sslv3 | sslv2 | tlsv1]. (optional)
-K, --keychain [] Look up the password from the Keychain. Use no value
or [ yes | true | <number greater than 0> ] as true.
Any other value is interpreted as false. (Mac only,
ignored elsewhere) (optional)
-B, --body The plain text BODY of the e-mail. (optional)
-E, --body_enriched
The ENRICHED BODY of the e-mail. (optional)
-H, --body_html The HTML BODY of the e-mail. (optional)
-a, --attach The path of an ATTACHMENT. Multiple uses will add
multiple attachments. Note: If the path specifies a
directory or a file with a resource fork, the
attachment will be compressed first. (optional)
-A, --attach_compressed
The path of an ATTACHMENT that will be compressed.
Multiple uses will add multiple attachments. (optional)
-e, --header str:str An additional HEADER. Should have the form
‘NAME:VALUE’. (optional)
-v, --verbose The level of verbosity from 0-2. Default is 1.
-q, --quiet Suppresses all output. Same as ‘–verbose 0’.
-R, --parse_from_console
Parse the headers and body of the e-mail from STDIN.
(optional)
-C, --body_from_console Get the BODY from STDIN. (optional)
-T, --to_from_console Get TO addresses from STDIN. Each address must be on
its own line. (optional)
-S, --parse_from_file
Parse the headers and body of the e-mail from a file.
(optional)
-F, --body_from_file
The absolute path of a file to be used as the BODY.
(optional)
-Z, --body_enriched_from_file
The absolute path of a file to be used as the ENRICHED
BODY. (optional)
-Y, --body_html_from_file
The absolute path of a file to be used as the HTML
BODY. (optional)
-O, --output_to_console Sends the e-mail text to STDOUT rather than attempting
to deliver it. (optional)
-w, --wrap_length Sets the hard wrap limit of the plain text BODY. A
value of 0 means no wrap and the minimum is 10.
Defaults to 76.
-h, --help Prints this help screen.
–help_conf Prints the help screen for optional config files.
NOTES
At least one TO or BCC address must be specified. Addresses must contain an
‘@’ and can be in the form ‘NAME ’. This information can be parsed
from STDIN or a file.
Data is read from the optional config files first, then STDIN or a file, then
switches are evaluated. This means that the data on the command line will
override or add to anything that is parsed from the config files, STDIN or a
file. BODY text specified in a parameter will be prefixed to any BODY data
parsed from STDIN or a file. Be careful when using this option with the HTML
BODY.
Where appropriate, attachments will be compressed using /usr/bin/ditto on the
Mac, /usr/bin/zip in Linux and an internal, pkzip-compatible format in
Windows. mtcmail assumes that these will be available and will generate an
error otherwise.
If KEYCHAIN is specified on the Mac, mtcmail will attempt to look up the
password by Service Name (the “where” field in the Keychain entry). It must
have the form “smtp://server_address:port” or “server_address:port”, and you
must first specify SERVER in either the command line or one of the config
files. If there are multiple entries, you can distinguish them by specifying
USERNAME too. Otherwise, the account name found in the Keychain entry will be
used for USERNAME.
While not required, mtcmail will recognize configuration files. Type `mtcmail
–help_conf’ for more information.
Report bugs to support@mactechnologies.com.