Fortunately, there are some software can help you to run an application that correlate with email in your local computer. One of them is ArGoSoft Mail Server (agsmail.exe), a little size freeware. You can download at http://www.argosoft.com/rootpages/download.aspx
To setup the Argosoft Mail Server, just follow these simple steps:
- Install the Argosoft Mail Server in your local computer. If done restart your computer
- Run the Argosoft Mail Server
- At Tools menu, choose Option and click on it
- Type “localhost” in the textbox, click the Add button and then click OK
- Now, at Tools menu, choose User and click on it
- Click the “Add New User” button
- In User Properties window, fill the User Name, your Real Name, Password, and Confirm your Password, for example: nopomawon, Yanis Rizaldi, secret, secret.
- Click OK if you’re done. Now, you already have an email address: nopomawon@localhost
Test it with a simple PHP application. mail(recipient, subject, message, additional header)
Now is time to test your localhost mail server. PHP has a function that can be used to send an email, it’s easy to understand and the syntax is pretty simple:
Let’s create a simple script to test your localhost mail server. Make sure the ArGoSoft Mail Server is active.
$recepient = “nopomawon@localhost”;
$subject = “Test an email”;
$message = “Test my localhost mail server”;
$from = “replay-to: someone@domain.com”;
$send_mail = mail($recepient, $subject, $message, $from);
If ($send_mail)
{
Echo “successfully send email”;
}
Else
{
Echo “Oops!, can’t send the email”;
}
Run the scrip. If success, you can see the mail using Microsoft Outlook or Outlook Express. Of course, you must setup the mail program as same as ArGoSoft’s User Properties.
Display Name : Yanis Rizaldi
E-mail addres : nopomawon@localhost
Account name : nopomawon
Password : secret
That’s all, just try and have some fun
Good luck
No comments:
Post a Comment