Add hook_mail() and sendmail() functions