Article 5EG95 [mail command] cannot send message

[mail command] cannot send message

by
thomasbb
from LinuxQuestions.org on (#5EG95)
To automatically update my computer, I made this script:
Code:#!/bin/bash
apt-get update &> /tmp/apt-list.log
apt-get upgrade -Ryq > /tmp/apt-info.log 2> /tmp/apt-error.log
if [ $? -eq 0 ] ; then
aptitude clean
mail -s "[Maintenance] Update done" e@mail.com <<< "Updated"
else
cat /tmp/apt-error.log | mail -s "[Maintenance] Update failed" e@mail.com
fibut it returns
Code:cannot send message: Process exited with a non-zero statusand error code is
Code:$ echo $?
36Any idea?latest?d=yIl2AUoC8zA latest?i=iG513Oe8Nt4:Rfs4oo8zUVE:F7zBnMy latest?i=iG513Oe8Nt4:Rfs4oo8zUVE:V_sGLiP latest?d=qj6IDK7rITs latest?i=iG513Oe8Nt4:Rfs4oo8zUVE:gIN9vFwiG513Oe8Nt4
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments