Thursday, 11 April 2013

Email from Raspberry Pi.

OK - Next thing I want to be able to do is to send mail from the RPi.

Following some of the instruction from

1 - Create a suitable gmail account to send mail from.
2. - sudo apt-get update
3. - sudo apt-get install ssmtp
4. - Edit /etc/ssmtp/ssmtp.conf

pi@raspberrypi /etc/ssmtp $ grep -v "^#" ssmtp.conf |grep -v "^$"

5. - Edit /etc/ssmtp/revaliases

6. - Test it..... create a file called message.txt which will contain the message. - e.g.

pi@raspberrypi ~/mail $ cat message.txt
Subject: test email

hello world!
It works!

Now run command - ssmtp < message.txt

Cool - it works!

No comments:

Post a Comment

Note: only a member of this blog may post a comment.