PDA

View Full Version : Is there a problem with 2 seperate iterations of ue?


roby258376
05-21-2009, 12:33 PM
Hi all,

I used Universal Email to automatically send an email to a new user, after their information has been inserted into the database. It works perfectly. Sends to the user, imbeds the data etc.

then I used UE to send the information in a form. I have used my own email address for testing purposes and I pull the initial values for each form field from the database IF the user is already logged in, otherwise, they can enter their own data.

This new form will NOT send the email to me.

so my question is, is there a problem with using UE more than once on a site? or is there something I'm missing with regard to pulling data from a db into a form that doesn't work with UE?

Any help is appreciated.

Ray Borduin
05-21-2009, 12:42 PM
You can use UE over and over on the same page yet alone the same site... there must be something wrong with the way it is set up.

roby258376
05-21-2009, 01:24 PM
thanks Ray, so what's the best way to find the error? I've compared the 2 and both are set up in almost exactly the same way, only difference is that one sends the email to a new user, with the field drawn from the db and the other (the one that is not working) is sending the email to my address.

Ray Borduin
05-21-2009, 01:35 PM
I'd add some debug code to the page. Maybe open up the mail object include and add some debug code to write to the page. Most likely the problem is in the one thing you changed?

Are they on the same page? Maybe you are redirecting to another page after sending the first email and it doesn't have a chance to send the second one.

roby258376
05-21-2009, 01:49 PM
They are on different pages, and if you could point me in the direction of some debug code and what to do with it, I'd appreciate it.

Still a php newbie.

Thanks

Ray Borduin
05-21-2009, 01:53 PM
open up the mail.php file and find where it sends the mail. (search for "send")

Then right after it sends add a die(); statement to write information about the email that was just sent.

Try die() with the email object itself. It should say true if it thinks the email was sent properly.

roby258376
05-25-2009, 10:13 AM
I feel luck a real newbie here so please pardon me if I seem totally unable to follow simple directions:

1) I don't have a mail.php file I do however have mail_PHP.php
2) I cannot find any "send" within this file, I can however find "function WAUE_SendMail"
3) can you please tell me what to write in the die statement?

Thanks

Ray Borduin
05-26-2009, 10:31 AM
You are on the right track.

At the bottom of that function you will find:

$mailObj = mail($mailTo,$mailSubject,$mailContent,$mailHeader );

return $mailObj;

Update it to:

die($mailContent);
$mailObj = mail($mailTo,$mailSubject,$mailContent,$mailHeader );
die($mailObj);
return $mailObj;

roby258376
06-03-2009, 11:41 AM
ok, did that and nothing changed. Clicking the submit button on my form still takes me to the right page, and I don't get any error message.

What else can I try?

roby258376
06-03-2009, 12:04 PM
ok, I figured out what the problem was. Apparently when using a form, the action must be blank or UE must be applied to the page the action points to. that was my problem. As soon as I got rid of the form action, the email is working.

Ray Borduin
06-03-2009, 01:52 PM
In general you can only respond to a form post on the page specified as the action. This goes for UE or any other server behavior.