mail() function

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
uod
-


Joined: 29 Apr 2006
Posts: 8
Location: PH

PostPosted: Sat May 13, 2006 6:44 am    Post subject: mail() function Reply with quote

Code:
<?
include("config.php");
$date = $_GET['date'];
$time = $_GET['time'];
$name = $_GET['name'];
$ip = $_GET['ip'];
$agent = $_GET['agent'];

if($action == "report"){
   $subject = "Reported Tag";
   $message = "A visitor has reported a tag posted on the $date at $time\n\n";
   $message .= "The tag was posted by $name with the IP $ip\n\n";
   $message .= "Regards\nUod";
   $headers = "From: Uod Tag Board  <$email>\r\nReply-To: $email\r\n";
   $success = mail($email,$subject,$message,$headers);
   if($success){
      $report = "Tag has been reported to the admin";
   }
   else{
      $report = "There was an error reporting the tag";
   }
}
?>
i always get "There was an error reporting the tag". what seems to be the problem?
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Sat May 13, 2006 9:41 am    Post subject: Reply with quote

Im not sure if the mail() function returns anything when its finished processing. This could be why.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat May 13, 2006 10:48 am    Post subject: Re: mail() function Reply with quote

uod wrote:
i always get "There was an error reporting the tag". what seems to be the problem?


In http://www.aprelium.com/forum/viewtopic.php?p=53511#53511 several mail() causes of failure are discussed.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group