switched to phpmailer and added validation