mail functions added