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.
- Edit your php.ini file located inside the php folder of your XAMPP installation path.
- Search for the line ';sendmail_path = "\"YOUR_XAMPP_PATH\sendmail\sendmail.exe\" -t"'
- If it has a ';' in the beggining, remove it
- Edit sendmail.ini file inside the sendmail folder
- Add the following lines
- Finally edit the account default line, it should look like this
account default : Gmail - That's it! Now restart apache and you can now send mails.
account Gmail
tls on
tls_certcheck off
host smtp.gmail.com
from [your-email]@gmail.com
auth on
user [your-email]@gmail.com
password [your-password]