Fixed emailer cleaned up code
Fixed emailer cleaned up code