How to send an email via router
In this page I describe how to send an email through a router (Asus RT-AC56U)
- we use an Entware installation, so please
refer to this page on how to install Entware on a router.
cat /opt/etc/msmtprc account default domain local host smtp.live.com port 25 protocol smtp from [myemail]@hotmail.com auth on user [myemail]@hotmail.com password [mypassword] tls on tls_starttls on tls_certcheck off syslog LOG_MAIL
Then we can use a script to send an email. This is a simple script used to send an email through "msmtp" command line utility - please remember that "from" email address of the script must be the same of the "from" email address of the configuration file:
#!/bin/sh msmtp -v -t << EOF From: [myemail]@hotmail.com Subject: Router - sample email test To: email@example.com This is a testing email sent by router through Entware. EOF exit 0