using email lib for extraction