Need help with Mail php script!!

Please support our PHP advertiser: 50% off 6 Months Dedicated Server Hosting from 1&1!
Reply

Join Date: Jun 2005
Posts: 3
Reputation: tucker is an unknown quantity at this point 
Solved Threads: 0
tucker tucker is offline Offline
Newbie Poster

Need help with Mail php script!!

 
0
  #1
Jun 2nd, 2005
I have been trying to make a simple php mail script, but it won't work! Here is the source below...why wont this work?

<?php
mail("tucker401@mailbolt.com", "This is the message subject", "This is the message body");
echo "message has been sent.";
?>

-tucker-
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 234
Reputation: PoA is an unknown quantity at this point 
Solved Threads: 8
PoA PoA is offline Offline
Posting Whiz in Training

Re: Need help with Mail php script!!

 
0
  #2
Jun 4th, 2005
Try
[PHP]mail("tucker401@mailbolt.com", "This is the message subject", "This is the message body","From: admin@yourdomain.com");
echo "message has been sent.";
[/PHP]
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 3
Reputation: tucker is an unknown quantity at this point 
Solved Threads: 0
tucker tucker is offline Offline
Newbie Poster

Re: Need help with Mail php script!!

 
0
  #3
Jun 4th, 2005
Originally Posted by PoA
Try
[PHP]mail("tucker401@mailbolt.com", "This is the message subject", "This is the message body","From: admin@yourdomain.com");
echo "message has been sent.";
[/PHP]
That still doesn't work thanks for the help though.

-tucker-
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 294
Reputation: zippee is an unknown quantity at this point 
Solved Threads: 6
zippee's Avatar
zippee zippee is offline Offline
Posting Whiz in Training

Re: Need help with Mail php script!!

 
0
  #4
Jun 4th, 2005
The variables in mail function are as follow:
mail($to_email, $subject, $message, $headers);
$header is optinal.

Make sure your hosting is support mail delivery (smtp enable). You may want to try using other free hosting services.
Ecommerce-Web-Store.com Building Your e-Business.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 234
Reputation: PoA is an unknown quantity at this point 
Solved Threads: 8
PoA PoA is offline Offline
Posting Whiz in Training

Re: Need help with Mail php script!!

 
0
  #5
Jun 4th, 2005
Are you trying to run the script on your own computer aka localhost? or with under domain?
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 3
Reputation: tucker is an unknown quantity at this point 
Solved Threads: 0
tucker tucker is offline Offline
Newbie Poster

Re: Need help with Mail php script!!

 
0
  #6
Jun 5th, 2005
OMG it works now! I think the problem was i was trying to run it under a free hosting service that had php, but that didn't support mailing...but now that i have a paid service it works. Thanks so much for all the help guys.

-tucker-
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 2586 | Replies: 5
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC