Send mail cmd

The classic mail command!

The mail command is a simple way to send an email from the command line. Here's a basic syntax:

mail [-s subject] [-c carbon-copy] [-b blind-carbon-copy] [email protected]

Here's a breakdown of the options:

Here's an example:

mail -s "Hello from the command line!" [email protected]

This will send an email with the subject "Hello from the command line!" to [email protected].

You can also use the -a option to attach a file:

mail -s "Hello from the command line!" -a file.txt [email protected]

This will attach the file file.txt to the email.

Note that the mail command is usually configured to use a default email client, such as mutt or mailx. If you want to use a different email client, you can specify it using the MAILCLIENT environment variable.

Also, keep in mind that the mail command is a simple tool and may not support all the features you'd find in a full-fledged email client.