In qsub, 'mail' or 'mailx' command is not available.
Alternatively, I can use 'sendmail' to do the same task as 'mail' or 'mailx'. This is especially useful for Nestor becuase Nestor does not have mail notification option in PBS as of now.
Examples of sendmail:
echo -e "subject \n body message" | sendmail email@email.com
Here, the \n separates the subject and the body message (http://unix.stackexchange.com/a/168233).
The sender is the hostname of the processor (?) you are using: e.g. hermes0199.westgrid.uvic.ca.
Unfortunately, some email client (like my old university's) blocked receiving email from this address for some reason.
So the solution here is the specify the sender (to some existing email address) with -f flag:
echo -e "subject \n body message" | sendmail -f "sender@sender.com" email@email.com
You can also specify the sender name with -F option:
echo -e "subject \n body message" | sendmail -F "Me from Nestor" -f "sender@sender.com" email@email.com
0 件のコメント:
コメントを投稿