add mail trigger
minor changes