Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 29th, 2006, 01:46 AM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.


Reply With Quote
  #2 (permalink)  
Old December 29th, 2006, 06:19 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 481
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mail sending PHP FAQs 0 April 2nd, 2007 06:43 AM
problems sending mail with java mail gandacuboy J2EE 2 December 20th, 2006 03:05 PM
sending mail anita VB How-To 3 September 30th, 2004 03:48 PM
Sending e-mail to different mail box! Calibus Classic ASP Databases 4 September 3rd, 2004 05:48 PM
Sending both text mail and HTML mail - CDONTS madhukp Classic ASP Basics 1 October 8th, 2003 01:05 AM



All times are GMT -4. The time now is 01:55 AM.


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