is there any php.ini or xammp setting or services I need to be using to achieve both mail and smtp delivery from my local imac?
In this case PHP is using a local sendmail for sending mail. Thus you have to configure sendmail in you imac.
You must configure your script with valid data for a smtp server, e.g. a SMTP server from your isp, or a SMTP server you have installed locally like sendmail.