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

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: