6th September 2009

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 =

with:

SMTP = smtp.yourisp.com
smtp_port = 25
sendmail_from = me@example.com

Or by setting the values in PHP:

ini_set("SMTP","smtp.yourisp.com" );
ini_set('smtp_port', 25);
ini_set('sendmail_from', 'me@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.

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

  1. I ran into this problem earlier in the year also, and some other issues with Zend Mail on WAMP which I blogged about:
    http://www.pyrosoft.co.uk/blog/2009/05/20/wamp-smtp-server-send-outgoing-emails/

Leave a Reply

Categories

Twitter

About Me

“I have a geek lifestyle, except geeks don’t have a life. Or style!”

Hi, my name is Steve and this is my blog. I am a web developer based in the United Kingdom. I like (X)HTML, CSS, Flash, ActionScript3, PHP, JavaScript, MySQL, [paste trendy words here] and Mapping APIs.