added mailing functions