Forums

no data in fields in emailed form

scott1137 05 Jan, 2010
Debug seems to show all is ok. When I check the received email the data I entered in the form is not there.

Here's debug:
1. Form passed first SPAM check OK
2. Form passed the submissions limit (if enabled) OK
3. Form passed the Image verification (if enabled) OK
4. Form passed the server side validation (if enabled) OK
5. $_POST Array: Array ( [client's_name] => scott Johnson [date] => 1/4/2010 [dob] => 11/xx/xxxx [address] => (deleted) [City] => San Diego [state] => CA [zip] => 92131 [phones] => [textfield] => [textfield2] => [referredby:] => [phone:] => [Agency_Name:] => David Johnson [socialsecuritynumber] => xxx-cc-ddd [insuranceinfo] => [Medicare_Number:] => [effectivedate:] => [otherinsurance:] => [primaryphysician:] => [telephone] => [psychiatrist:] => [telephonenumber:] => [reasonforreferral:] => test sheet [clientssupport] => [psychotropicmeds:] => [priminsdedmet2009] => [effectdate] => [hhc] => [crossoverclaim] => [secinsneedauth] => [outofnetworkbenefit] => [innetwork] => [coins] => [clinicianassigned] => [acceptancedate] => [notes] => [Submit] => Submit [1da05caa5be1add463e59506cd34cada] => 1 [1cf1] => 8bc8dd9cd1c17795d4258b45b2179ff3 [chronoformname] => referral_sheet )
6. $_FILES Array: Array ( )
7. Form passed the plugins step (if enabled) OK
8. An email has been SENT successfully from (Admin)admin@helprofessionals.com to [email]webmaster@helprofessionals.com[/email]
9. Debug End

And here's sample of emailed:
Client's name: {Client} Date: {Date} DOB: {DOB2} Street Address: {Address} City: San Diego State: {State} Zip code: {Zip code}

Thanks,
Scott
scott1137 05 Jan, 2010
PS - I do see that the data for "City" field showed up in the email. So searched the html to see if I could find a reason. Nothing I can find. Here's snippet:
<p>
<label>Client's name:
<input name="client's name" type="text" id="client's name" size="20" maxlength="50" />
</label>
<label>Date:
<input name="date" type="text" id="date" size="12" maxlength="20" />
</label>
<label>DOB:
<input name="dob" type="text" id="dob" size="12" maxlength="20" />
<br />
</label>
<label><br />
Street address:
<input name="address" type="text" id="address" size="30" maxlength="50" />
</label>
<label>City:
<input name="City" type="text" id="city" size="12" maxlength="15" />
</label>
<label>State:
<input name="state" type="text" id="state" size="4" maxlength="3" />
</label>
<label>Zip:
<input name="zip" type="text" id="zip" size="5" maxlength="15" />
</label>
</p>

Thanks,

Scott
GreyHead 05 Jan, 2010
Hi Scott1137,

The {field_name} in the template must use **exactly** the same value as the name='field_name' attribute in the input.

You have name='date' and {Date}, name='dob' and {DOB2}, . . .

None of them match.

You also have name="client's name", please remove the apostrophe and the space, names can safely use [a-z][A-Z] and underscore only.

Bob
scott1137 06 Jan, 2010
Thank you, Bob. Getting closer...

Patience, please, new at forms...I'm still not clear on how to correct.
So in form html I make the label match the input name - or is there some other matching that I do?

Q's:
1. How do I handle multiple telephone labels (e.g., phone for, for doc 1, doc 2)
2. If it's matching label to input, then how to handle it so that it matches my client's wishes (like, when they want "Client's name")
3. When I re-do the html that will change the template?
4. How would I edit template directly? Can't seem to make that work (it highlights whole section like for cut/copy) but no edit window opens.

I am sure this is all right before my nose but ...
scott1137 07 Jan, 2010
I think I figured it out:
I copied email template to notebook, edited it to match input names in html form, pasted it back to template. Since then I figured out how to turn off template editor, so can edit there.

But when I went to send me a test all looked ok according to debug but I never received the email. Changed email addresses (to another on the client's host and also to my gmail address) and started receiving:PHPMAILER_RECIPIENTS_FAILED messages. Changed back to original email address and those messages stop but still no emails.

I've changed nothing on Joomla's server settings. Where do I look to fix this?

Scott
GreyHead 07 Jan, 2010
Hi Scott,

Q2) It's not matching 'label to input'. It's matching the value of the name attribute in the input tag to the column name in the database table. Neither of these are normally visible to the client.
<label>Whatever you like</label><input type='text' name='myname' value='' />


Q1) Give them names like phone1, phone2, phone3

Q3) Not unless you completely delete the existing template. Then and only then ChronoForms will try to create a new one from the Form HTML

Q4) In the Form Editor (not the Wizard Edit), click the Email Template tab.

PHPMAILER_RECIPIENTS_FAILED usually means that the To Email or From Email addresses were missing or invalid.

Bob
scott1137 07 Jan, 2010
Thanks for clarifying.
Earlier successfully sent emails eventually showed up.

Now I get that PHPMAILER_FROM_FAILED message for the original address that I re-entered.

Only thing I'm changing is the email address in Set up Emails box. Maybe I'm not doing that right.

There's this message in read above the box:"Click Add Email to add new Email" Does that mean that I don't edit email addresses in the box but set up a new one?
GreyHead 08 Jan, 2010
Hi Scott,

The message "Click Add Email to add new Email" means click to create an entirely new Email Setup.

There's clearly something wrong with the content of one or more of the email boxes but hard to diagnose without seeing the entries.

Bob
scott1137 09 Jan, 2010
Screenshot attached.
scott1137 09 Jan, 2010
PS - All I've done in this box between when it worked and didn't was change email address as described. Sorry didn't capture the red lettering described earlier.
Thanks for your patience.
Scott
GreyHead 09 Jan, 2010
Hi Scott,

All that looks OK - I see no reason whay there would be any problem as long as the email address is valid i.e no spaces or illegal characters.

Bob
scott1137 09 Jan, 2010
Thanks for checking it. I pasted it from an email.

I'll try creating a new box/email or adding another. Tinker further.

Will report back.
scott1137 14 Jan, 2010
I gave it the '72 hour step back' fix. Now it all works well & as advertised.

I think I must have been missing a save or apply step along the way.

Now when I change email addresses in email setup I get [email]PHPMAILER_RECIPIENTS_FAILEDwebmaster@helptherapist.com[/email] as before. Email address changed is good. Flushed cache after applying, saving.

Puzzled as to how to change email there so it works.

Many thanks,

Scott

1/18 Update. I have tried other email addresses. "Apply" "Save" clear cache. Continue to get this error message. Debugs ok. Only change made was the email address when I got it the way we wanted and ready to go live.

So close yet so far....

Suggestions please.๐Ÿค” ๐Ÿคจ ๐Ÿค”
scott1137 21 Jan, 2010
Do the 'from' and 'to' addresses need to have the same domain name?

That is so far the only way I can get this to work: 'from' is [email]admin@mydomain.com[/email]. 'to' is [email]webmaster@mydomain.com[/email].

If I change either to emails form different domains then I get the error message discussed.
GreyHead 22 Jan, 2010
Hi Scott1137,

You certainly don't need the same domain name in both fields from ChronoForms point of view, or the PHP mailer. Something else is going on here.

[sendfb][/sendfb]
Bob
Max_admin 03 Oct, 2010
Hi Scott,

Try to use the SMTP instead ?

Cheers,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
scott1137 03 Oct, 2010
Hi Max,

Server settings show it as SMTP already.

Best,
Scott
GreyHead 03 Oct, 2010
Hi Scott,

The form appears to be emailing OK. I restored it into my test site I submitted a couple of times. The first time I forgot to remove the client's name from the To box first and got a query email back from her. The second time it emailed successfully to me.

It looks like something is blocking the mails at the ISP level. I wonder if the To and From addresses are aliases and so the mailer sees them as the same?

Bob
scott1137 03 Oct, 2010
Hi Bob,

Could be. It worked for my testing using my email and stopped when I entered the new one.

Owner's son got the new domain names and emails via Google apps. They love this name. I could enter Denise's home email - which this forwards to - but that would beg the question as they want to convert all their forms to online.

I don't understand email well enough to know how to work around aliases otherwise. Suggestions?

Thanks,

Scott
GreyHead 03 Oct, 2010
Hi Scott,

Get them to check the GMail Spam folder - could be that's where they are. If so then a GMail filter might sort it.

Can you get the GMail login to check. You just need to make sure that there are at least two email users set up that are not just Nicknames one of the other.

Bob
scott1137 05 Oct, 2010
With her permission, changed to her private email address with same results. It is same isp as my private email which was working. They are both different the the website email isp.

Scott

form backup:[attachment=0]referral_sheet_001.zip[/attachment]

PS nothing in spam folders.

PPS and near as I can tell looking at the Google apps settings the emails are distinct - each with it's own name and destination.
GreyHead 06 Oct, 2010
Hi Scott,

I'm not sure I have anything else to suggest except to talk to the ISP :-(

I restored the form backup, changed the To address to mine (actually two, one Gmail and one not). Both emails have just arrived safely. I really don't think this is a ChronoForms problem but struggle to see what is causing it.

Bob
scott1137 06 Oct, 2010
Hi Bob,

Thank you for taking a look and narrowing the search.

If anything occurs to you or others seeing this I'd welcome hearing about it.

I'll post solution. Soon I hope.

Best,

Scott
scott1137 09 Oct, 2010
Hi Bob,

isp claims not them that all is okay.

Went to web host support. He was very patient & helpful.

Not sure if I'm clear on all we did:

Because of the recent domain name change - used Google apps and their email host for the site, I needed to set up an email within the web host to use as the "from." This meant changing smtp settings. He looked at everything and said it should work now as soon as I update the smtp settings in the form. We could not find where to do that.

He also sent me a link that describes a related - or maybe same change to make. Could not find a folder that matches the one one on the link. He apparently did and said that it had been changed differently and needed to be corrected. Presumably this change and the needed smtp change are the same.

Here's link he sent: https://help.brinkster.com/KB/a189/joomla-error-phpmailer-recipients-failed.aspx?KBSearchID=0

Hope this is clear. Where would I make the change?

Scott

PS - did find folder. Here's the next section of code, line 162 ff:
    if (!$pparams->get( 'custom_reply' ))
        {
            $MailFrom     = $mainframe->getCfg('mailfrom');
            $FromName     = $mainframe->getCfg('fromname');

            // Prepare email body
            $prefix = JText::sprintf('ENQUIRY_TEXT', JURI::base());
            $body     = $prefix."\n".$name.' <'.$email.'>'."\r\n\r\n".stripslashes($body);

            $mail = JFactory::getMailer();

            $mail->addRecipient( $contact->email_to );
            $mail->setSender( array( $email, $name ) );
            $mail->setSubject( $FromName.': '.$subject );
            $mail->setBody( $body );

            $sent = $mail->Send();
GreyHead 10 Oct, 2010
Hi Scott,

The specific link that your hosting company gave you is not especially relevant here. As far as I can see it refers to an old version of the Joomla! Contact component.

You do need to make sure that the From Email address that you use in an Email Setup matches the domain name. Not every ISP checks this but an increasing number do. If there is a mismatch then there is a higher chance of an email being marked as spam. For the same reason you should avoid using the Dynamic From option.

My understanding though is that the form sends emails OK - just not to some email addresses. That still doesn't make sense to me.

Bob
scott1137 15 Oct, 2010
Hi Bob,

It was, as I hoped, a simple solution. It took fresh eyes. Somehow in Mail Settings under Global Configuration SMTP Authentication was changed to "No". "Yes" it needs to be.

Now, to complete the security part of this adventure, I am preparing to take down the old non-https version of the site. Part of this preparation as I understand it is to put a redirect in the secure folder. Will research this and proceed.

I am including this extra detail in this narrative for any other poor sole who may follow this way...

The site owner now wants to put up many more online forms...

Again many thanks.

Scott
GreyHead 15 Oct, 2010
Hi Scott,

Great. delighted you found the solution. Sometimes the simplest causes are the hardest to find.

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