Wednesday, August 17, 2011

PHP mail() on WAMP

  1. Install the fake sendmail. (http://glob.com.au/sendmail/)

  2. Configure fake sendmail to use a valud SMTP server.

    example: Gmail
    smtp_server=smtp.gmail.com
    auth_username=your gmail username
    auth_password=your gmail password


    sources:
    https://mail.google.com/support/bin/answer.py?answer=13287
    http://www.geekzone.co.nz/tonyhughes/599

  3. Configure "php.ini" to use fake sendmail.

    example:
    sendmail_path = "c:\wamp\sendmail\sendmail.exe -t"

    source:
    http://www.joshstauffer.com/send-test-emails-with-wampserver/

  4. Restart Apache/WAMP.

  5. Write a call to mail() in PHP & run it.

No comments: