Home Php Create your Email Server by PHP
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Create your Email Server by PHP

Advertisement
Whenever we develop an email system, we can not test it without web hosting.

Create your Email Server by PHP

     

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:

http://download.cnet.com/3001-2369_4-10038331.html?spi=4234db21025b5bfdf512805b0f16d21b

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.

Code:

<?php

$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";

}

else

{

echo "Sorry could not sent";

}

?>

 

Output:

Advertisement

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 20, 2009

Ask Questions?    Discuss: Create your Email Server by PHP  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
Brian
June 21, 2012
cant type in local domains box

This tutorial looks great, but do you have any idea why I cant type in the local domains box. I can access that tab, but I dont have the option to do anything once i'm there, everything is grayed out. Thanks.
Farbod Farhour
July 31, 2012
Thanks a lot!

very nice post, thanks.
Jasmin
September 4, 2012
Create a new account

How to Create a new account??? i can't open Application.
ssvdgthr
October 29, 2012
aqetraha

thanks , it worked
DMCA.com