I download one Mail Server.NET version 1.0.8.3, it is on 30 days trial. I am testing it on my local windowsXP computer. I have wampserver installed on my computer.
Below is what I have done:
1. Run ArGoSoft Mail Server .NET
2. enter domain name: localhost , username: postmaster and also password
3. tick "users of this server will be sending mail to outside users"
4. I open outlook express
- go to Tools > Accounts...
- Click Add > Mail
- Insert my mail account : postmaster@localhost
5.
server information - Incomming mail and Outgoing mail type "localhost"
Incoming Mail Server - Account name type "postmaster@localhost" and the same password, and tick "remember password", "log on using secure password authentication".
6. I started wampserver, run
http://localhost/mail.php, see below code
// ---------------- SEND MAIL FORM ----------------
// send e-mail to ...
$to="postmaster@localhost";
// Your subject
$subject="Test";
// From
$header="from: tomliutest@gmail.com";
// Your message
$message="Hello \r\n";
$message.="This is test\r\n";
$message.="Test again ";
// send email
$sentmail = mail($to,$subject,$message,$header);
// if your email succesfully sent
if($sentmail){
echo "Email Has Been Sent .";
}
else {
echo "Cannot Send Email ";
}
?>
After I run the code, i got below inf
Warning: mail() [function.mail]: SMTP server response: 550 A valid address is required. in D:\wamp\www\test\mail.php on line 20
Cannot Send Email
so I changed $to="postmaster@localhost"; to $to="tomliutest@gmail.com";
After the change, it seems work, and shows "Email Has Been Sent .", but in my mailaccount tomliutest@gmail.com, I did not get it.
So my question is :
1. if I want to send mail to postmaster@localhost, how should I do?
2. if I want to send mail to tomliutest@gmail.com, how should I do?
Thanks!