Add permissions checking to mails