Create your Email Server by PHP
(Learn to Create your Email Server.)
Create your Email Server
Whenever we develop an email system, we can not test it without web hosting. Another option is to install a web mail server like Argosoft. We can easily create a mail system using PHP and Argosoft mail server.
Argosoft mail server supports SMTP/POP3/IMAP protocols. This mail server and PHP can turn your computer into a server. This tutorial will help you to install and run this server. After that the following code will help you to test an email system using Outlook or ThunderBird mail system.
You can download the server from the following site:
After download, install the software by hitting the series of next buttons appeared on the windows, after installation you will get an icon on the right side of the taskbar (tray icon) of argosoft mail server. Right click on it and select option:
Type localhost and press ok button, this window will setup a local domain for you, named as localhost.
To add your name as a user do as follows:
Click the New button, another window will appear as follows and it will ask for your User name, real name, password, confirm password etc.
Just fill the above mentioned textboxes and click ok
After that we need to create a mail account in Outlook express, thunderbird or similar kind of application. In this tutorial we use thunderbird. To create an account in thunderbird do as follows:
i) Open the application and click on Create a new account.
Select an email account, click next, the next window will ask for your name and email address as below, type a name and name@localhost in the email address section:
Next couple of windows will ask for the name of the server, and ask for the confirmations, after that you will get your account.
$to="basu@localhost"; $sub="Greet"; $msg="This is new message"; $header="From:basu@localhost"; $mail=mail($to,$sub,$msg,$header); if($mail)
echo "Mail successfully sent";
echo "Sorry could not sent";
Liked it! Share this Tutorial