added email workflow implementation