p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Beginning PHP (http://p2p.wrox.com/forumdisplay.php?f=95)
-   -   sending mail (http://p2p.wrox.com/showthread.php?t=52046)

mgnishan December 29th, 2006 01:46 AM

sending mail
 
<?php $to = "mgnishanthan@missioncode.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "nisanth_2001@yahoo.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";?>

i try to send mail using this code but i got error like this,anyone help plz..

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for mgnishanthan@missioncode.com in c:\inetpub\wwwroot\mail.php on line 6
Mail Sent.



surendran December 29th, 2006 06:19 AM

hai,
i think you are using localhost, if you are using localhost, just activate your SMTP service.

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com


All times are GMT -4. The time now is 05:09 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.