NateUNI
|
Posted: 12/16/2003, 11:21 AM |
|
I have code that should send out email after a record is inserted. However I recieve the following error:
Warning: Server Error in c:\program files\easyphp\www\onlinestats\New_Ticket_events.php on line 26
Warning: Cannot add header information - headers already sent by (output started at c:\program files\easyphp\www\onlinestats\New_Ticket_events.php:26) in c:\program files\easyphp\www\onlinestats\new_ticket.php on line 534
Here is my code in New_Ticket_events:
function BugTracking_AfterInsert()
{
$BugTracking_AfterInsert = true;
global $BugTracking;
if (isset($_SESSION['EMAIL'])) {
$to = $_SESSION['EMAIL'];
$subject = "NEW TICKET";
$message = "THIS IS A NEW TICKET";
$from = "NATE@SHIFTYEYES.COM";
$additional_headers = "From: $from\nReply-To: $from\nContent-Type: text/plain";
mail ($to, $subject, $message, $additional_headers);
}
return $BugTracking_AfterInsert;
}
And my new_ticket.php code:
//Go to destination page @1-6F9FD7CC
if($Redirect)
{
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
$DBConnection1->close();
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
Any ideas on how to fix this? Thanks!
|
|
|
beshoo
|
Posted: 12/22/2003, 6:39 PM |
|
hi :)
1st: Do you have a mail server ?
please tray to be shur by sen a normal mail like :
<?
mail ("test@test.com", "test", "hi all");
?>
or to see your phpinfo file...
<?
phpinfo();
?>
|
|
|
NateUNI
|
Posted: 12/23/2003, 8:10 AM |
|
My mail server is a novell server, and everything looks correct in my phpinfo.php file, any other suggestions? Thanks!
|
|
|
|