devinemke wrote:all that PHP's [man]mail[/man] function does is hand the mail off to the server's SMTP app, so if your SMTP app has a virus then it could absolutely affect all outgoing mail.
In other words, the risk is no greater than sending email via Outlook through the SMTP mail server on that host.
The only risk I would be concerned with (other than incompetent system administrators on your web host) would be if your PHP application is accepting file uploads to be included in the mails, in which case you should incorporate some sort of virus-scanning application to scan them. And, of course, you need to sanitize any user inputs to prevent mail header injection that could allow hackers to use your script to send spam and other nasty things.