I am customizing the usage report scripts in order to organize the data better and implement lowering a users speeds after their data cap is hit. To do this I need to be able to send e-mails with the header Content-type: text/html.
I have not been able to find any information on how to make this work.
The reliant code:
:set text “$combinedtext $sitename:$percentage% of $gigs GB$megsdowncurrent MB$megsupcurrent MB”
:set combinedtext “$text”
/tool e-mail send server=“” from=“monitor@mycompany.com” to=“$email” subject=“Usage report on $date at $time” body=“Site Usage Report
$text
Regards, monitor@mycompany.com”
:log info “Email sent to $email”
Here are the options I have under the Mikrotik send function. (RouterOS 5.5)
/tool e-mail send
body cc file from password port server subject tls to user
/tool e-mail edit
address from password port user value-name
/tool e-mail export
file hide-sensitive
/tool e-mail get
address from password port user value-name
/tool e-mail set
address from password port user
I usually do the same thing in php by:
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”;
and then use php’s mail function and it works great.
We have to be able to add headers right?
A little help would be much appreciated.
Thanks in advance