SMTP server settings for outgoing email using WAMP

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_port = 25
sendmail_from =

Or by setting the values in PHP:

ini_set("SMTP","" );
ini_set('smtp_port', 25);
ini_set('sendmail_from', '');

Replace with that of your ISP’s SMTP server, for example

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.

One Reply to “SMTP server settings for outgoing email using WAMP”

Leave a Reply