Sending mails from localhost with XAMPP Lite

>> Monday, February 21, 2011

One of the most common tasks of web development is sending emails, whether from a registration process, password recovery or if they suscribed to an update, you will need to send emails. The problem is that XAMPP doesn't have a default configuration for sending mails, and developing without this ability is pretty dull, you need to test your mails!
But don't worry, you won't have to install anything, and you wont need a hosting, you just need a Gmail or Hotmail account.

  1. Edit your php.ini file located inside the php folder of your XAMPP installation path.
  2. Search for the line ';sendmail_path = "\"YOUR_XAMPP_PATH\sendmail\sendmail.exe\" -t"'
  3. If it has a ';' in the beggining, remove it
  4. Edit sendmail.ini file inside the sendmail folder
  5. Add the following lines
  6. account Gmail
    tls on
    tls_certcheck off
    from [your-email]
    auth on
    user [your-email]
    password [your-password]
  7. Finally edit the account default line, it should look like this
    account default : Gmail
  8. That's it! Now restart apache and you can now send mails.
If you want to use Hotmail instead of Gmail just change the host to '', the email adresses, and if you want, the account name (Hotmail instead of Gmail).

Post a Comment

  © Blogger template Simple n' Sweet by 2009

Back to TOP