Improved error handling. Added AgentTicketEmail to check local address.