Forums: Troubleshooting Table Events - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Troubleshooting Table Events It's not sending an email out? Rate Topic: -----

#1 User is offline   powersitedesign 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 62
  • Joined: 13-October 06
  • Gender:Male
  • Location:Arkansas

Posted 10 April 2008 - 09:46 PM

I wrote a class catalog / registration application w/ PHPR a little while back and it's working great w/ the exception of my table event not sending an email after a record is added. I have racked my brain trying to figure out why this isn't working. It's not hosted on one of my servers so I don't have easy access to check the mail quee to see if the messages are getting hung up there although I have had the server admin that is hosting the site check this for me and he didn't see the messages hung in the quee.

Here's the weird part, occasionally the registration process will send an email out and then most of the time it won't? I have had another developer check behind me and we can't think of anything else that could be wrong, anyone have any tips we might try for troubleshooting this app?

Here's a copy of my table events that I have setup after a record is added...

// Parameters:
// $values - Array object. 
// Each field on the Add form is represented as a 'Field name'-'Field value' pair
// $keys - Array object with added record key column values


//**********  Redirect to another page  ************
header("Location: [url="http://www.anurturingtouch1.com/confirmation.php");"]http://www.anurturingtouch.com/confirmation.php");[/url]
exit();



// **********  Send simple email  ************

$email="steph@anurturingtouch.com.com";
$message="New Registration has been made on your website, please login and retrieve their information, [url="http://www.anurturingtouch.com/cms";"]http://www.anurturingtouch.com/cms";[/url]
$subject="New Registration";
mail($email, $subject, $message);


As you can see I also have a redirect setup in the table events and it's working just fine...
Any suggestions as to where I might look to find this bug?

Thanks for your help in advance!
0

#2 User is offline   Jane 

  • Advanced Member
  • PipPipPip
  • Group: Admin
  • Posts: 7278
  • Joined: 13-June 06
  • Gender:Female

Posted 11 April 2008 - 09:42 AM

Hi,

I recomend you to send email before redirecting.
Also to check sending emails use IF condition:

Quote

// ********** Send simple email ************

$email="steph@anurturingtouch.com.com";
$message="New Registration has been made on your website, please login and retrieve their information, http://www.anurturingtouch.com/cms";
$subject="New Registration";
if (mail($email, $subject, $message))
echo "email was sent";
else
echo "error";

//********** Redirect to another page ************
header("Location: http://www.anurturingtouch.com/confirmation.php");
exit();

best regards,
Jane Endaltseva
e-mail: support@xlinesoft.com
0

#3 User is offline   powersitedesign 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 62
  • Joined: 13-October 06
  • Gender:Male
  • Location:Arkansas

Posted 11 April 2008 - 12:37 PM

Thanks Jane! That did the trick!
0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users