Community discussions

 
icsterm
just joined
Topic Author
Posts: 23
Joined: Sun Mar 11, 2018 11:11 pm

If e-mail is sent, true/false variable

Sat Feb 09, 2019 6:42 pm

Hello,

Can someone cook me a quick script that does the following:

If
"/tool e-mail send to=me@me.com body="$strName Logs for $strDate" subject="$strName Logs for $strDate $strTime" file=log"
is sent successfully, then do:
/file remove log
log info message="Logs successfully sent via e-mail!"
else
log info message="Could not connect to SMTP server!"

Having trouble figuring out how to validate the /tool e-mail send command...
Also a delayed loop will be nice if the email could not be sent, let's say 5 minutes...
 
User avatar
Jotne
Forum Veteran
Forum Veteran
Posts: 949
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: If e-mail is sent, true/false variable

Sun Feb 10, 2019 12:05 am

I have used email for a long time (gmail) and never missed an email, so I do not see the need for testing it.
Not sure if and how Router would log this.
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 

Who is online

Users browsing this forum: No registered users and 4 guests