in reply to sendmail close error

You're probably better off not reinventing this particular wheel. Net::SMTP and Net::SMTP::TLS have always served me well. Others will recommend Mail::Sender or MIME::Lite. There's plenty to recommend any of those. In fact, if you're wanting a form mailer, do a search for 'nms formmail'.

If you're still wanting to know what else to check in this particular case, a good place to start would be your mail server logs. If you don't have access to them your hosting provider will.