Revert "Clear listener object after modifying mail headers."

This reverts commit f2d19bcb89a8d5b7a6d072d2134b7aa011af3911.