email detail modal popup working