You changed the most important line to an SMTP server that accepts your connections?

Code:
sockopen sendmail smtp.server.com 25

If not, change it.

If it still isn't working, show us some errors.