Minor API improvement of mails plugin