utils for mail service