954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

email application using php

I want an email application using php.
The code is like this.

<?php

$to = "example@mail.com";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: [email]abc@rediff.com[/email]" . "\r\n" .
"CC: [email]abc@rediff.com[/email]";
mail($to,$subject,$txt,$headers);
?>

but an error has occured
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\mail.php on line 28

haii
Newbie Poster
5 posts since Jun 2008
Reputation Points: 10
Solved Threads: 0
 

go into the php.ini file and change the smtp host to your isp's smtp address.

kkeith29
Nearly a Posting Virtuoso
1,357 posts since Jun 2007
Reputation Points: 235
Solved Threads: 194
 

I have another doubt about how to set up an smtp server

haii
Newbie Poster
5 posts since Jun 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You