Send IP Address to EMail

Send IP Address to EMail

Postby babadagi » Tue Nov 22, 2011 8:04 pm

commands list.

1. ipkg update
2. ipkg install nano
3. ipkg install mstmp

4. nano /opt/etc/mstmprc
5. Paste this texts, change bold text to your username/pass

defaults
tls on
tls_certcheck off
logfile /tmp/msmtplog.txt
#
account gmail
host smtp.gmail.com
port 587
auth on
user yourmailaddress@gmail.com
password yourpassword
from yourmailaddress@gmail.com
#
account default : gmail

7. save & exit (ctrl-x, yes)

8. nano /wgetjob

paste this texts

#!/bin/bash
rm /index.html
wget http://checkip.dyndns.org -O index.html
cat headers.txt > mail.txt
cat index.html >> mail.txt
cat mail.txt | msmtp --debug --from=default -t youripaddress@gmail.com

9. save & exit

9.1 chmod 777 /wgetjob

10. nano /headers.txt
paste this text

Mime-Version: 1.0
Content-type: text/html
Subject: My IP Address

11. save & exit

12. goto web managment console and select cron tab, enable cron each boot, and click add a new job

13. select hour list (my selection is workhours)

14. select job text and write sh /wgetjob

15. generate job line and save

sorry for this dirty and quick tutorial.. my child cries out on the couch... :)
babadagi
 
Posts: 19
Joined: Tue Jul 05, 2011 10:13 am
Location: IZMIR/TURKIYE

Return to Philips SPD8020

Who is online

Users browsing this forum: No registered users and 2 guests