hello all who read,
im here to write this forum, because i have exhausted all means (to my knowledge) of figuring this out. I used the same settings with another outlook and it worked. Basically i have a form and when the user hits "submit", the form gets directed to a submission page where the form get inputed into mysql and all of the inputs get mailed out to me to let me know that someone submitted something. I am using Windows XP 32 and XAMPP. Here is what i have done so far
1) Changed in php.ini and php5.ini SMTP and smpt_port to outlook server address and port number
2) Pinged the outlook server with success
3) On submission page here is my code

<?php
ini_set("SMTP","outlook.address");
ini_set("smtp_port","25");
$to = "my email address on outlook";
$subject "email";
//Some Code....

$send = mail($to, $subject)
if($send) {
print "thanks"
} else {
print "sorry there was an error"
}
?>

Can someone plz let me know what i am doing wrong??

Hi.

The PHP part of this is pretty simple.
Basically what you wrote, except you left out the body of the email. The mail function requires three parameters.

If for some reason this failing, my best bet is that there is something wrong with whatever is supposed to receive the message...

Is there perhaps a firewall on your OS blocking this?
Does the SMTP server require authentication?

In any case, you could try using a better mailer method.
The PHP Mailer classes have worked well for me in the past.
I'd recommend you try them out.
If nothing else, they might be able to provide a more detailed error description.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.