Forums

{Solved} Forms Mailing Only Once

ironlion37 05 Jun, 2012
Hi,

I'm using v4 RC 2.0 with Joomla 1.5.23. I'm using email GH events. The site uses a rocket theme template with their gantry system.

While building a new form, I noticed there are issues with the forms on the site:
1. The form located on the home page is simple and still works fine: http://www.kimtindallandassociates.com

2. This form, which is more complex, was working fine and now simply fails to mail it contents:
http://www.kimtindallandassociates.com/request

3. This form is brand new (you can use it to test - it only mails to me, not the client), and is also complex in that it has file attachments. This form fails to successfully mail its contents as well (with or without uploading file attachments).

Here's the deal: if I use Joomla's "clean cache" tool, form #3 will mail once. If I submit it again, it won't mail the second time. I notice that the recaptcha letters stay the same on the 2nd load which indicates to me it's loading a cached version of the form.

My hosting company recently started requiring SMTP authentication for site mail. So my theory is that the cached version of the form (submit #2) is perhaps causing the system to fall back on sendmail (therefore not throwing any error) but that's not going through because it lacks authentication.

So, I'm open to any thoughts on what's happening here. And my question is, of the following cache items, which is holding the form and how do I disable the cacheing of the form?

Gantry 9 387.29
_system 3 36.55
com_content 5 18.97
ironlion37 05 Jun, 2012
p.s. I'm using Dreamhost

Ok, so to answer my own question - setting "Cache Settings" to "Cache: No" under Joomla's global configuration stopped the caching of the form and eliminated the issue of the form only mailing once.

The problem I have now is that file uploads are not working. The file name is displayed in the mail template but no file is actually attached. I've confirmed that the "File Attachments" field in the Email GH event has the correct field values...
GreyHead 06 Jun, 2012
Hi ironlion37,

Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.

Note: if you are using the Easy Wizard you may need to switch to the Advanced Wizard to do this; if you want to continue to use the Easy Wizard please make a copy of your form first and add the Debugger action to the copy.

I use Dreamhost too and don't know of any particular problems with ChronoForms there.

Bob
GreyHead 06 Jun, 2012
Hi ironlion37,

Cached forms won't work with Captcha. The cached image will never match the one that the form is expecting.

I don't think that you have much control over the Joomla! cache but there are cache extensions like CacheControl that will let you exclude specified pages from caching.

Bob
ironlion37 06 Jun, 2012
Hi Bob, I pm'd you the debug results.
GreyHead 06 Jun, 2012
Hi ironlion37,

I wonder if the file attachment problem is because there are spaces in the file name? I don't see any other obvious problems.

Bob
ironlion37 06 Jun, 2012
Bob, one other question in troubleshooting this (because all form emails have stopped again):

What is the relationship between the "mail from" setting in Joomla > Global Config> Mail settings and the "From email" setting in the "Email setup" tab of the email GH event?

Right now I'm using "contact@domain.com" in the joomla config and a dynamic field in the email GH event:

{input_text_2}


I was just wondering if perhaps this setup could be contributing to the problems I'm having.

Thanks.
GreyHead 06 Jun, 2012
Hi ironlion37,

From the Help tab:

The boxes on the Email Setup tab will accept either a string e.g. [email]user@example.com[/email] or an input name in curly brackets {input_text_1}. This lets you mix and match static and dynamic values.

The one special case is the From Email box which will only accept a valid email address. Using a dynamic From Email address is the most frequent cause of failed emails. Use a dynamic Reply To Name and Reply To Email to make it easy to reply to the form submitter. Note: If you are an experienced user and you need to use the dynamic From Email box you can enable the curly brackets by adding ##OK## to the box.



Bob
ironlion37 07 Jun, 2012

Hi ironlion37,

I wonder if the file attachment problem is because there are spaces in the file name? I don't see any other obvious problems.

Bob



Hi Bob,

1. I have removed the {input_text_2} and am using a regular email address in the "From email".
2. There was a problem with dreamhost yesterday where mail was not being sent. So the form is back to working again but, attachments still aren't working.
3. I tried uploading a document with no spaces in the title. No effect.
4. It occurs to me to show this to you to make sure I've done it correctly:

input_file_5:doc-docx-xls-xlsx-jpg-pdf-bmp,input_file_6:doc-docx-xls-xlsx-jpg-pdf-bmp,input_file_7:doc-docx-xls-xlsx-jpg-pdf-bmp


And lastly, I'm leaving the debugger on until you have a chance to look at it.

Most importantly - there is another form on the site:

http://www.kimtindallandassociates.com/request

I have not touched that form at all in months (opened, saved, etc..) and attachments are broken for it too. And that was definitely working. What has changed in the meantime is that dreamhost has started requiring SMTP authentication. What that means is that in the Joomla global config, under "Mail Settings", I have had to set SMTP authentication to "Yes" and provide a valid FTP login for the "SMTP Username" and "SMTP Password" fields. "SMTP Host" is set to "localhost". If I change "SMTP Host" to [email]mail@domain.com[/email] (which dreamhost says is an option), then the chronoform throws the error (unable to connect to SMTP host). I have an email in to them right now asking how to get SMTP authentication working using the [email]mail@domian.com[/email] setting as the "SMTP Host".

None of that was required before when I built the /request form (link above) and had it working. So I'm presuming that file attachments not working has something to do with this new SMTP Authentication requirement by Dreamhost.

And, I just tried using the PHP Mailer and I can get that to mail as well, but same problem: no attachment...
ironlion37 07 Jun, 2012
Hi Bob,

I am able to get the joomla mail settings to work with [email]mail@domain.com[/email] - so that's not the issue.

All I'm left with is that I have a form that was sending attachments just fine and now neither that one nor my newer form are able to do so.

I'm stumped.
GreyHead 08 Jun, 2012
Hi ironlion37,

I've taken a backup copy of the process_service form and will dig around that on my local server. I'm curious that I don't see any debug output from the File Upload or from the Emails.

I have checked that the file uploads correctly and that all the form settings look OK.

You might want to upgrade to the latest version of ChronoForms as there have been quite a few bug-fixes since the version you are using here.

Bob
ironlion37 08 Jun, 2012

Hi ironlion37,

I've taken a backup copy of the process_service form and will dig around that on my local server. I'm curious that I don't see any debug output from the File Upload or from the Emails.

I have checked that the file uploads correctly and that all the form settings look OK.

You might want to upgrade to the latest version of ChronoForms as there have been quite a few bug-fixes since the version you are using here.

Bob



Thanks Bob. I have upgraded to component version 4.0 RC3.4.1 and plugin version V4 RC3.0 which are the latest available for jooma 1.5 in the download section of this site. Still no file attachment.
ironlion37 28 Jun, 2012
Bob,

I finally heard back from Dreamhost. I am sending you the details via pm.
ironlion37 04 Jul, 2012
Bob, did you ever have a chance to take a look at the pm I sent you?
ironlion37 24 Jul, 2012
Hallelujah!!!!

I finally found out what the issue was (my that was painful).

In the email GH event, there is this instruction:

for uploaded files use {input_name}

I wasn't including the brackets around the field names.

Phew.

I think this may have changed with an upgrade? As I said I have a form on the site that used to work then stopped...
GreyHead 25 Jul, 2012
Hi ironlion37,

As you say Hallelujah!

There were problems with some versions of the Email [GH] action on Joomla! 1.5 because of code differences between the Joomla! versions. These have now been fixed.

The uploaded files use the curly brackets syntax because you can also specify a static file attachment using a file path.

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