MAILCTL
Description
Mail agent daemon
Command
mailctl [-hBvo] ( --reload-config | --dump-config | --ha-reload | --stats )
mailctl --send-mail <[--to|--g_too <arg>] | [--cc|--g_cc <arg>] | [--bcc|--g_bcc <arg>]> -s <arg> ( -b | -f ) <arg> -h [ --help ] Display this message.
-B [ --background ] Execute in background (will not print the results).
-v [ --verbose ] Enable client verbose mode.
-o [ --libxo ] arg Specify the output format, arg may be "text|html|xml|json[,pretty]" (default is "text,pretty").
-r [ --reload-config ] arg Make maild reload its configuration. Exclusive with other queries. Arg must be one of:
"None","Verbose","All"
--send-mail Sends a mail.
--ha-reload-active Sends a HA notify query to go in active mode. Exclusive with other queries.
--ha-reload-passive Sends a HA notify query to go in passive mode. Exclusive with other queries.
--stats Display statistics about maild. Exclusive with other queries.
Send Mail parameters:
--to arg Set an address as main (TO) mail recipient
--cc arg Set an address as a carbon copy (CC) mail recipient
--bcc arg Set an address as a blind carbon copy (BCC) mail recipient
--g_to arg Set a group as a main (TO) mail recipient
--g_cc arg Set a group as a carbon copy (CC) mail recipient
--g_bcc arg Set a group as a blind carbon copy (BCC) mail recipient
-s [ --subject ] arg Set the mail subject
-b [ --body ] arg Set the mail body
-f [ --body-file ] arg Use a file content as mail body.
Results
Example
mailctl --stats -o json mailctl --send-mail --to toto@mail.local -s "Test subject" -b "Test mail body"