Install software:

opkg update
opkg install msmtp
mv /etc/msmtprc /etc/msmtprc.bk
nano /etc/msmtprc
account default
host smtp.gmail.com
port 587
auth on
user [email protected]
password password
auto_from off
from [email protected]
tls on
tls_starttls on
tls_certcheck off
logfile
syslog LOG_MAIL

Install software:

opkg update
opkg install mutt
nano ~/.muttrc
set sendmail = /usr/bin/msmtp

Send email via Gmail server:

echo "body of email" | mutt -s "subject of email" [email protected]

Send email with attachment via Gmail server:

echo "body of email" | mutt -s "subject of email" -a /file/to/attach.txt [email protected]

Comments powered by CComment