Mailx configuration in linux
- how to use mailx command in unix
- how to use mail command in unix
- how to send attachment using mailx command in unix
- how to use mailx command in linux
Mailx command in unix example.
Mailx command in linux with smtp
mailx in Linux
Linux has an inbuilt Mail User Agent program called mailx. As the name suggests, it is a console application that is used for sending and receiving emails. The mailx utility is an enhanced version of the mail command.
Along with the functionality provided by the original mail command, it provides extra features like the ability to send attachments by using the -a flag. The mailx command is available from a variety of different packages:
- bsd-mailx
- heirloom-mailx
- mailutils
Installing mailx
For Ubuntu/Debian:
sudo apt-get install bsd-mailxFor fedore/centos:
Note: Even though the mailx command is a newer version of the original mail utility, it can still be referenced with the ‘mail’ keyword.
Sending an Email
1.
Writing the message directly in the command line: To send a simple email, use the “-s” flag to set the subject in quotes which is followed by the email of the receiver. After this, mailx waits for the content of t
- mailx command in unix example