-
Notifications
You must be signed in to change notification settings - Fork 9
msmtp is a an email transfer agent with a sendmail like command line interface.
If not already present in your Yocto image, it can be bitbaked by bitbake msmtp
and installed from the generated package.
The following user specific config file ~/.msmtprc
was used for testing (but some sensitive info was replaced by stars):
defaults
auth plain
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.msmtp.log
account default
host smtp.strato.de
port 587
from *****@************.***
user *****@************.***
password ***************
The following email was sent for testing. Again, sensitive info (recipient's email address) was replaced by stars:
root@raspberrypi3:~# echo "Hi dude" | sendmail -d *****@************.***
Note that sendmail is a link to msmtp.
The -d
(debug) option displays useful debug info on the screen.
It should be omitted for regular use.
The log file contains summary info about the emails sent.
Note that the email sender's password on the SMTP server is contained as plaintext in the config file. It is possible to avoid this, see the links below.