PHP simple : PHP tutorial, MySQL tutorial
PHP Tutorial - Free PHP Script

Home | Tutorials | Php vs Node.Js | Web Tools

Create your Email Server

Tutorials > Create your Email Server

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.

Click here to download Mail Server Freeware

ArGoSoft Mail Server Installation.

  1. Install this program to your machine.

    ArGoSoft Mail Server

  2. Go to Tools > Options. Then select tab "Local Domains".
    1. Put "localhost" and click "Add" button.
    2. Click "OK" button.

    ArGoSoft Mail Server

  3. 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 ([email protected]). Then click "OK" and "Close" button.

    ArGoSoft Mail Server

  4. Set up your Email Client Software. (Microsoft Outlook, Incredimail, Mozilla Thunderbird, etc.) by create a new email account with information below;
    - Email address "[email protected]" 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);


<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

// Target email address.
$to="[email protected]";

// Your subject.
$subject="Test Email";

// Sender. You may put the sender's email address after "from:". This example file use "[email protected]"
$mail_from="from: [email protected] n";
// Set this email to HTML email format.
$mail_from .="Content-Type: text/html; charset=utf-8 n";

// Your message.
$message="Hello, This is your test email.<br>
Your email server is working now!

// Send email.
$sentmail = mail($to,$subject,$message,$mail_from);

// If your email succesfully sent.
echo "Email has been sent.";
else {
echo "Cannot send email.";


  • Copy this code and save as send_email.php to your root folder, open this file by browse to http://localhost/send_email.php.
  • Open your email client program to recieve email.

Put Ebay RSS Feeds onto your website
SEO Elite Software
Domain Dashboard CPanel & Seo Manager
Work at Home Ideas and Opportunities
Introduction & Get Start
Using Form
PHP Tags
PHP Variables
PHP Control Structures
Create Database & Table
Database Connection
Insert Record
Select Record
Update Record
Delete Record
[email protected]