When you create an auto email sender program with mail() function. You can not to test it on your machine(localhost). You have to upload and test it on your web hosting, but now you can test php mail() function on your localhost using Argosft mail server.
ArGoSoft Mail Server is full SMTP/POP3/Finger/IMAP server for all Windows platforms, which will let you turn your computer into the email system. It is very compact, takes about 1-5 Mb of disk space (depending on the version), does not have any specific memory requirements, and what is the most important - it's very easy to use.
Go to Tools > Options. Then select tab "Local Domains".
1. Put "localhost" and click "Add" button.
2. Click "OK" button.
Go to Tools > User
1. Click on Add New User icon.
2. Fill your user name, name, password. User name refers to your email address (username@localhost). Then click "OK" and "Close" button.
Set up your Email Client Software. (Microsoft Outlook, Incredimail, Mozilla Thunderbird, etc.) by create a new email account with information below;
- Email address "webmaster@localhost" and password as the same that created in ArGoSoft Mail Server.
- Incomming and Outgoing mail use "localhost".
- Other settings, you should be set as the standard settings or default by programs.
• Test your email server
Create a PHP file "send_email.php" for test ArGoSoft Mail Server on your machine. This file using mail() function for send some parameters from this file to your email server.
mail(target_email, subject, message, email_from);
Copy this code and save as send_email.php to your root folder, open this file by browse to http://localhost/send_email.php.