Add option to set a mail config

Add an optional attribute to `mail.sendmail` to handle sending mails with different accounts.