I have the following entry in a bash script:

```
 echo "Please see attached file" | mailx -S smtp=$smtpServer -s "Subject of the mail" -a $logfile -r "sender@domain.com" receiver1@domain.com receiver2@domain.com

```

It's working fine if there is no error in sending mail, but if there is an error, mailx will show the error message and wait for user to press the enter key. How can I want to avoid that? It should not wait for the user to press the enter key.