Well I have searched some of the possibilities to install command line mail clients but there are no easy ways to install. Is this even possible without compiling the mail client ?

  • OpenElec doesn't seem to be intended for that kind of thing, so if they don't have it, they don't have it. You might want to ask about that here: raspberrypi.stackexchange.com – goldilocks Dec 31 '13 at 12:03
  • You would need a copy of mailx that had been built for the ARM CPU, This link may be useful, netduinoplusfun.wordpress.com/2012/07/03/… – X Tian Dec 31 '13 at 13:49
  • @XTian : There are regular distros for the pi that will have mailx in the repo, the problem is openELEC isn't one of them. You might be able to run one from e.g., raspbian, but you also might not. – goldilocks Dec 31 '13 at 14:56
  • Or maybe there is some alternative for mail sending in command line ? – jurka Dec 31 '13 at 15:41
  • If you still desire XBMC media center and want to have more access to other linux items, you might try raspbmc. It runs xbmc fantastically (much improved speed wise the last couple of months as well), and you can ssh in and it has the raspbian repositories for apt-get where you should be able to do this (using mailx, pine, etc.) – Drake Clarris Dec 31 '13 at 16:24

Funny thing, almost 3 years later I am unable to find any progres regarding answering that question, today at LibreElec.

If it helps someone: to send an e-mail from my LibreElec Raspberry Pis, I ssh to my router and send an e-mail using the router. This is absolutelly the simplest solution. Actually, I consider that way beter than using separate mailers on separate (and different) systems. This way, I allways use the same syntax and the same program in the same way - regardles of the device sending me an e-mail.

Workaround can make use of any other device capable of doing it, it needent be a router. Obviously, you need to have such a mail sending device.

The actual code from my RPi script and Asus routers is (minus the obvious variables and with ssh keys allready authorised):

echo "Subject: Msg from Raspberry" > mail.txt
echo "From: me@raspberry.pi" >> mail.txt
echo "Date: `date -R`" >> mail.txt
cat mail.txt | ssh root@ "/usr/sbin/sendmail -S"$MAIL_SERVER" -f"$MAIL_TO" $MAIL_TO $MAIL2_TO" 
rm mail.txt

A reminder: for the script to work from RPi LE autostart.sh when RPi is booting, one must use /storage/mail.txt (and not the relative form as in simplified sample above).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.