Added a mailing function