22.11.2017, 13:00
There's no point in using another function, you can just use mail(to, subject, message) from common functions. You should also wrap mail function call with log(mail(...)) to see the mail server response which might contain an error of some sort.