add mail functionality