Odd problem with e-mail

arhospitality 10 Nov, 2009
I have just started using your form software. It seems quite nice and I've gotten a couple of forms working but my e-mail stops working for seemingly no reason. I have searched and searched the forums and while I am probably overlooking something simple I just can not figure out what the problem is.

Edit: I have tried it with the debug on and off.

[attachment=2]Debug Info.jpg[/attachment]
[attachment=1]General-Setup.jpg[/attachment]
[attachment=0]Email-Setup.jpg[/attachment]
GreyHead 10 Nov, 2009
Hi arhospitality,

All the images look fine - but the debug code you posted isn't showing any emails as sent.

There's no reason I can think of why ChronoForms would send sometimes but not others.

I did wonder if the From and To email addresses were aliases for the same mailbox?

What shows up in the Emails column in the Forms Manager listing where it says enabled & disabled ??

Bob
nml375 10 Nov, 2009
Hi arhospitality & Bob,
To me, it looks like the debug output is missing the last step: "Debug end."

Do you have any custom "on submit before email" code?

/Fredrik
arhospitality 10 Nov, 2009

Hi arhospitality,

All the images look fine - but the debug code you posted isn't showing any emails as sent.

There's no reason I can think of why ChronoForms would send sometimes but not others.

I did wonder if the From and To email addresses were aliases for the same mailbox?

What shows up in the Emails column in the Forms Manager listing where it says enabled & disabled ??

Bob



Yes the From and To e-mail addresses were aliases for the same mailbox. I changed that though and it still didn't work.

It shows one as enabled.

Hi arhospitality & Bob,
To me, it looks like the debug output is missing the last step: "Debug end."

Do you have any custom "on submit before email" code?

/Fredrik



No I have no custom code.
arhospitality 11 Nov, 2009
I thought about posting this in the other thread but I don't want to derail you from that person's original problem which is slightly different, although similar to mine.

The e-mail was working until I made a change to the e-mail setup. It seems to me that Chronoforms is saving the initial e-mail setup but something is blocking it from saving the changes. I attempted to add another person in the To field using a comma to separate our names. Do you think there could be some minor bug in the code causing this?

Also my site is currently running a test sub-domain and was upgraded from a Joomla 1.0 site using the migration script, could that be making a difference somehow?

Also I am running Joomla 1.5.15 now, although I was running 1.5.14 when this problem started.
GreyHead 11 Nov, 2009
Hi arhospitality,

I wonder if something has changed in Joomla 1.5.15?? That might explain these two similar problems this week. My test site is still on 1.5.14, I'll upgrade it and take a look.

Comma separated addresses in the To box should be OK (there was a time when a space with the comma would cause a problem but I thought that had been fixed).

Bob
nml375 11 Nov, 2009
Hi arhospitality,
Would you consider doing the following edits to add additional debug information? Add the bold line as shown below:
[list=1]
  • /components/com_chronocontact/libraries/chronoform.php: line 431
    return;
    }
    $MyForm->addDebugMsg('Completed On Submit - Before email code');
    }

  • /components/com_chronocontact/libraries/chronoform.php: line 438
    //send emails
    if(!$MyForm->haltFunction["emails"]){
    $MyForm->addDebugMsg('Sending emails...');
    $emails_result = $MyFormEmails->sendEmails($MyForm, $MyFormEmails->emails);
    $MyForm->addDebugMsg('Emails sent: <br />' . print_r($email_result, true));
    }
    }

  • /components/com_chronocontact/libraries/mails.php: line 94
    foreach($emails as $email){
    $MyForm->addDebugMsg('Loaded email ' . $email->emailid . ($email->enabled == "1" ? '(enabled)':'(disabled)'));
    $MyForm->addDebugMsg('- details: ' . print_r($email, true));

    $email_params = new JParameter($email->params);

  • /components/com_chronocontact/libraries/mails.php: line 100
    $email_body = ob_get_clean();
    $MyForm->addDebugMsg('Email body template generated...');
    //build email template from defined fields and posted fields
    /components/com_chronocontact/libraries/mails.php: line 127
    $this->emailsbodies[] = $email_body;
    $MyForm->addDebugMsg('Email body generated...');
    /**
    * Wrap page code around the html message body
  • [/list:o]

    This should provide a little more insight as to what is going on.
    /Fredrik

    Edit: Added one more line to the debug output:
    $MyForm->addDebugMsg('- details: ' . print_r($email, true));
    arhospitality 11 Nov, 2009
    I discovered what was causing the problem. It was the Confirmation Page plug-in. When I turn it on the e-mail stops working and when I turn it off the e-mail starts working again. I can't believe I didn't have all the plug-ins turned off that's so elementary when trying to debug something. Thank you so much for all of your help, even though it was my own fault.

    Maybe you should make a debugging tutorial to at least help remind some of us about the basics from time to time.

    If you would like I can try and help you debug the issue since my site is not live yet anyway, although I plan to take it live ASAP!

    Thank you,

    Jason
    This topic is locked and no more replies can be posted.