Does anybody know if you can configure php\'s mail() command so it will only use an SMTP server rather than the local sendmail? We are having trouble with emails being marke
Just configure your local sendmail to use your upstream mail server as a relay! That way, you don't have to change anything on the PHP side.
It would not be a good idea to send mail directly from PHP with SMTP, because you would lose everything from error handling to queueing this way!