Refactored code and working x-smtp headers
Header test