Setting PHP for Email Sending with SMTP
From HostPedia
In order to activate email sending from your localhost you should make should have the following setting applied:
- Open php.ini file, usually located on:
- Unix - "/usr/local/lib/php.ini" or "/etc/php.ini".
- Windows/NT - "C:\Windows\php.ini".
- If you fail to find in those places your php.ini file or you are not sure which php.ini file you suppose to edit, create a new php file and add the following line of code:
phpinfo();
- Look for "SMTP" and set your SMTP values:
- Win32: SMTP = smtp.yourdomain.com or sendmail_from = webmaster@yourdomain.com.
- Unix - You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = /usr/sbin/sendmail
- Save the file and restart your web server.



