DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   email application using php (http://www.daniweb.com/forums/thread127452.html)

haii Jun 3rd, 2008 4:21 am
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

kkeith29 Jun 3rd, 2008 4:22 am
Re: email application using php
 
go into the php.ini file and change the smtp host to your isp's smtp address.

haii Jun 3rd, 2008 4:51 am
Re: email application using php
 
I have another doubt about how to set up an smtp server


All times are GMT -4. The time now is 6:47 am.

Forum system based on vBulletin Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©2003 - 2010 DaniWeb® LLC