Forums

CFv4 Email [GH] action not working correctly

zitrusblau 11 Jul, 2012
Hello,

i tried your latest custom email action with chronoforms and it's almost working for me.
I use it with J! 1.5.26 and ChronoForms 4.0 RC3.3

But one thing just won't work:

when getting the user-email from the currently logged-in user and storing it in the form->data array, i can't access it via curly brackets notation in the "to"-field, i.e. {user_email}
Also joomla gives me an error onSubmit, that he can't send an email to "{user_email}".

all the data is stored correctly and accessible in email template though.

also, when using {user_email} in "cc"-field and filling a valid email-address as main recipient in "to"-field, it's working! It then retrieves the email address correctly.

it seems he just can't lookup the {user_email}-var in the "To"-Field somehow.

Can you shed some light on this issue? Don't know what else to do...
Sending it via CC is not an option here.

Thanks in advance,

-daniel
GreyHead 11 Jul, 2012
Hi Daniel,

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.

Bob

PS I suggest you also upgrade your ChronoForms to the latest release as there have been some bug-fixes.
zitrusblau 12 Jul, 2012
Hey Bob,

thanks for your fast response. Are there no issues with existing forms when updating the component?

Here's the debug info:

Data Array: 
Array
(
    [option] => com_chronoforms
    [view] => form
    [Itemid] => 6
    [chronoform] => Reklamationsformular
    [event] => submit
    [input_kundenname] => Testkunde
    [input_kundennr] => 12345-K
    [input_retournr] => 9283nhkj2398
    [input_message] => message.....
    [input_image_2] => 
    [input_checkbox_sendcopy] => 1
    [art_bez_input_0] => bananas
    [art_nr_input_0] => 3456
    [art_stk_input_0] => 1.000
    [art_gewicht_input_0] => 50kg
    [art_mhd_input_0] => 10.10.2012
    [art_grund_input_0] => rotten
    [input_reklamation_submit] => Absenden
    [642c70120f9719e07de5001a0315daa9] => 1
    [_PLUGINS_] => Array
        (
            [upload_files] => Array
                (
                )

        )

    [artikel] => Array
        (
            [0] => Array
                (
                    [Artikel-Bezeichnung] => bananas
                    [Artikel-Nr] => 3456
                    [Stückzahl] => 1.000
                    [Gewicht] => 50kg
                    [MHD] => 10.10.2012
                    [Reklamationsgrund] => rotten
                )

        )

    [user_email] => d***.k***@gmx.net //as you can see, the data is here...just greyed it out a bit with asterisks
    [IPADDRESS] => 127.0.0.1
)
Validation Errors: 
Array
(
)
Debug Data
email
3
Result
An email has been SENT successfully from (Grell.de)i***@g***.de to k***@zitrus***.de
Body
Reklamation/Waren-Rückgabe

Kundendaten

Kundenname	 Testkunde
Kundennr.	 12345-K
Retoure aus RG-/LS-Nr.	 9283nhkj2398
Nachricht	 message.....
Artikeldaten

1. Artikel
Artikel-Bezeichnung	bananas
Artikel-Nr	3456
Stückzahl	1.000
Gewicht	50kg
MHD	10.10.2012
Reklamationsgrund	rotten

Attachments
array ( )
Email info
Email failed
PHPMAILER_RECIPIENTS_FAILED{user_email}
From: (Grell Naturkost) r***@g***.de
To: d***.k***@gmx.net // the data is here, too?!
Subject: Ihre Reklamation
Email body
(email body stripped)


---

does this help?
joomla also gives an error message on top:
PHPMAILER_RECIPIENTS_FAILED{user_email}
zitrusblau 16 Jul, 2012
thanks for formatting the debug-info😉
zitrusblau 19 Jul, 2012
Hi Bob,

Updating the Component didn't help, either.

There must be an issue with the curly bracket tags not being replaces somehow since the error always is
PHPMAILER_RECIPIENTS_FAILED{user_email}

even though the user_email field is set in the forms data array. As i stated before CC field works, if there's a valid email entered in TO field.

Changing the user email address didn't help, either.

any more ideas maybe?

muchas gracias!
-daniel
dtour 22 Jul, 2012
Hi Daniel,

I am having exactly the same problem. Did you ever find a solution?

Update: it appears that a dynamic "to" address by itself does not work. If I have a string of email addresses the email will send.

e.g

{email_input} - will not send
{email_input},{email_input} - will send both emails
[email]example@example.com[/email], {email_input} - will send both emails

my workaround is to use the last and set the emails to send individually.
GreyHead 22 Jul, 2012
Hi dtour and zitrusblau,

I can't replicate this problem on my test site. Maybe because I am using SMTP as my mail service but I don't see anything in the code that treats the CC and To emails differently.

By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.

Bob

PS My test form is here with debug on
GreyHead 24 Jul, 2012
Hi zitrusblau,

With dtour's help I've been able to find the bug and fix it. Please upgrade to the latest version of the Email [GH] action.

The problem was a mis-typed variable that only showed up with some combinations of settings.

Bob
zitrusblau 01 Nov, 2012
Hey,

sorry for not answering for a while.

Glad you could fix this! Just installed, tested again and it's now working! 😀


Thank you for helping out here!

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