Implementing email agent