Add email error logging
Mail port should be an integer