The relevant setting is in the [mail function] section of php.ini, and is called sendmail_path. It should be assigned the path to sendmail, typically /usr/sbin/sendmail or /usr/bin/sendmail (but check your system to get it right).
Configure PHP to Use a Local Mail Server for Sending Mail
Thus your configuration might look like:
sendmail_path = /usr/sbin/sendmail
If you use a different mail server, use its sendmail wrapper (var/qmail/bin/sendmail for qmail, for example).