changed error handling && mail sending transporter