Question: i am trying to use localhost to send mail. however, i am getting this error when sending:

Warning: mail() [function.mail]: SMTP server response: 550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1). i have smtp settings correct in php.ini and am just confused as to what this means. thanks

Answer: 
There seem to be two primary reasons for this. 

1. The first has to do with the email client configuration (google INVALID HELO OUTLOOK).
2. The other reason is an improperly configured SMTP server where the server sends out emails with only the server name and not a fully qualified name (e.g., emailserver vs emailserver.mydomain.com).

You should contact your hosting company and give them as much detail as you can. They should be able to help.

If you are using cPanel, you can disable HELO checking. See the user guide. The trade off is you will receive more spam...
I had a similar problem with postfix in Ubuntu. It turned out that I'd not set 'myhostname' in the postfix configuration file. 

The problem disappeared when I configured 'myhostname' in the following file:

/etc/postfix/main.cf