I’m fairly new to scrpits and was wondering if there was a way I can pull the ip address from an interface and email it. An example of what i’m trying to do is. I have dsl with centurytel and I run pppoe out of my routerboard and I dont want to pay the cost to have a static address so I was just going to create a script that could get the ip from the pppoe on my routerboard and email it to myself.
While you can do that, a more effective way would be dynamic DNS. Check out changeip.com and the correlating script on the wiki at http://wiki.mikrotik.com/wiki/Dynamic_DNS_Update_Script_for_ChangeIP.com
Right on thnx i’ll check it out
Or if you insist, you can do this:
:log info “ip info beginning now”
/tool e-mail set server=[:resolve smtp.xxxxxxx.com]
:delay 10s
:log info “ip being emailed”
/tool e-mail send to=“xxx@xxxxx.com” subject=([/system identity get name].
" ip info") from=[/system identity get name] body=([ /ip address get [/ip address find interface=pppoe-out1 ] address ].
" public ip address")
:log info “ip info finished”