Having the ability to send test emails is great especially if you frequently work on scripts that require email generation. How can we do this using WampServer?
Open the “php.ini”.
Search for the attribute called “SMTP” in the php.ini file. Gennerally you must find the line “SMTP=localhost”. Change the localhost to the smtp server name of your ISP. In general, this will be something like mail.mydomain.com.
And, there is another attribute called “smtp_port” which should be set to 25.
And finally set the sendmail_from = email@example.com
Restart the apache server so that PHP modules and attributes will be reloaded.
If the method above does not work:
Step 1: Download sendmail
Download sendmail and extract all the files in the folder “C:\sendmail\”
Step 2: Configure sendmail.ini
Open the file “C:\sendmail\sendmail.ini” and add the following params in the corresponding lines:
Step 3 : Configure php.ini
Open the php.ini, find the following lines and add the path to the sendmail executable file. Don’t forget to restart the Apache server after doing that.
sendmail_path = “C:\sendmail\sendmail.exe -t”