Forrest logo
tool overview
On this page you find all important commands for the CLI tool mailx. If the command you are looking for is missing please ask our AI.

mailx

Mailx is a Unix command line tool used for sending and receiving email messages. It is an enhanced version of the earlier mail command.

  1. It allows users to send mail from the command line without the need for a graphical email client.
  2. Mailx can send email to both local users on the same system and remote users on other systems.
  3. It supports various email protocols such as SMTP, POP3, and IMAP.
  4. Users can compose email messages directly in the command line interface using the mailx editor or by inputting text from a file.
  5. It supports attachments, allowing users to send files along with their emails.
  6. Mailx provides options for setting the subject, from address, and other email headers.
  7. Users can also specify carbon copy (cc) and blind carbon copy (bcc) recipients.
  8. It includes features like email forwarding, automatic replies, and message encryption.
  9. Mailx can display and manage email in different folders, including the inbox, outbox, and sent items.
  10. It can also be used in scripts for automated email notifications or other email-related tasks.

List of commands for mailx:

  • mailx:tldr:906af mailx: Send mail with content read from a file.
    $ mailx -s "${subject}" ${to_addr} < ${content-txt}
    try on your machine
    explain this command
  • mailx:tldr:a42f7 mailx: Send mail specifying the sender address.
    $ mailx -s "${subject}" -r ${from_addr} ${to_addr}
    try on your machine
    explain this command
  • mailx:tldr:b0ca6 mailx: Send mail with an attachment.
    $ mailx -a ${filename} -s "${subject}" ${to_addr}
    try on your machine
    explain this command
  • mailx:tldr:f3e20 mailx: Send mail (the content should be typed after the command, and ended with `Ctrl+D`).
    $ mailx -s "${subject}" ${to_addr}
    try on your machine
    explain this command
  • mailx:tldr:feeaa mailx: Send mail to a recipient and CC to another address.
    $ mailx -s "${subject}" -c ${cc_addr} ${to_addr}
    try on your machine
    explain this command
tool overview