gasrabingo.blogg.se

Mail command in linux not working
Mail command in linux not working










To go back to the previous email, enter the - symbol at the ampersand prompt.Ĥ. To go to the next email, enter the + symbol. To read the Nth email, just enter the mail number at the ampersand prompt and press enter. The ampersand prompt allows you to read, reply, navigate and delete the emails.

mail command in linux not working

To go back to the main prompt, type CTRL+z or CTRL+d depending on your operating system and press enter. It also displays the ampersand (&) prompt at the end. N 2 Wed May 18 00:00 21/1053 "Mail subject 2"įrom the above output, you can see that, it displays the from-address, date and subject of the emails in the inbox. Mail -s "Mail subject" mail -f /var/spool/mail/user So write the contents of the body in a file and send the mail using one of the following options:Ĭat body.txt | mail -s "Mail subject" input redirection operator Specifying the body with the echo statement is a tedious process. You want to compose a mail which contains 100 lines in the body. The mail command sends the email to the user Specifying the body in a file The -s option is used for specifying the mail subject. The basic functionality of the mail command in unix or linux system is to send an email to the user.Įcho "Mail body" | mail -s "Mail subject" the echo statement is used for specifying the body of the email. r : Specify the from address in send mail options. b : Send blind copies of the mail to the list of users. This is like cc option in Microsoft outlook. c : Send carbon copies of the mail to the list of users. Delivery details are displayed on the terminal.

mail command in linux not working mail command in linux not working

The options of mail command are listed below:

#MAIL COMMAND IN LINUX NOT WORKING HOW TO#

How to know the status of backup, whether it is succeeded or not? In this case, sending an email from the automated script at the end of the backup will be helpful in knowing the status. For example, you have written an automated script for taking weekly backup of oracle database. Mail command will come in handy especially when writing automated scripts. The Mail command in unix or linux system is used to send emails to the users, to read the received emails, to delete the emails etc.










Mail command in linux not working