PHP and SMTP Authentication
When I was dealing with this, I concluded that conceptually what you need to do is configure Sendmail to autoforward to the SMTP Server. Your PHP should out of the box already communicate sending email through sendmail based on the default settings in the php.ini file. You are not going to get PHP to communicated directly with the SMTP server. However, you can configure Sendmail to do so.