made sending mail configurable