Before reading this article, you are required to install Xampp on your PC. This will automatically install other needful components. Then you would have to do some changes in php.ini that i am describing below.
Locate php.ini which should exist on following path. I am assuming that you had installed Xampp on C drive.
\php\php.ini C:\ \php\php5.ini C:\ \apache\bin\php.ini
- Open php.ini file and uncomment the php_smtp.dll extension. This is required when sending emails to a remote server.
- Scroll down and find the following lines:
[mail function] ; For Win32 only. ;SMTP = localhost ;smtp_port = 25 ; For Win32 only. ;sendmail_from = email@example.com
- From the lines above, uncomment SMTP, smtp_port and sendmail_from
directives, then add SMTP server, SMTP port number and your preferred email address to SMTP, smtp_port and sendmail_from directives respectively, your final code should be similar to the one below:
[mail function] ; For Win32 only. SMTP = mail.server.com smtp_port = 25 ; For Win32 only. sendmail_from = firstname.lastname@example.org
- Replace mail.server.com and email@example.com with correct values. The default
- Restart your server. That you can do from xampp controller.
Now you just need some application that can send e-mail from your PC. You can use wordpress for the same.