If you’re running WAMP and need the ability to use the PHP mail function to send outgoing e-mails, then you will need to modify the php.ini settings.
As WAMP itself does not have an SMTP server, the easiest option is to replace the SMTP address with the name of the SMTP server or IP Address with one that you can use.
This can be achieved by either editing the php.ini directly, replacing:
;SMTP = localhost ;smtp_port = 25 ;sendmail_from =
SMTP = smtp.yourisp.com smtp_port = 25 sendmail_from = firstname.lastname@example.org
Or by setting the values in PHP:
ini_set("SMTP","smtp.yourisp.com" ); ini_set('smtp_port', 25); ini_set('sendmail_from', 'email@example.com');
Replace smtp.yourisp.com with that of your ISP’s SMTP server, for example smtp.ntlworld.com.
Depending on your current settings, it’s likely that you may only need to modify the SMTP value as the others – smtp_port and sendmail_from – may already be defined.
Now restart the Apache server in order for your changes take effect, then test the changes by calling the PHP mail function.