Interesting email issue

chriso0258 20 May, 2012
When I configured the Email[GH] action, I was getting the following error message from the debugger:

Warning: Invalid argument supplied for foreach() in /home/jesusmyl/public_html/tnchess/administrator/components/com_chronoforms/form_actions/email_gh/email_gh.php on line 208
Invalid address:
Warning: implode() [function.implode]: Invalid arguments passed in /home/jesusmyl/public_html/tnchess/administrator/components/com_chronoforms/form_actions/email_gh/email_gh.php on line 267


So, I deleted Email[GH] and used the default Email action, copied and pasted the template I used in Email[GH], and get no warnings.

The email gets sent in either case. Why the difference? Both are configured with the same configuration information.

Here is the array info:
Array
(
    [chronoform] => indiv_patron
    [event] => submit
    [Itemid] => 692
    [option] => com_chronoforms
    [view] => form
    [membership] => 100
    [first_name] => Me
    [last_name] => Again
    [address1] => 78945 Fake ST
    [address2] => 
    [city] => Nowhere
    [state] => AL
    [zip] => 12345
    [phone] => 123-456-1212
    [email] => noone@example.com
    [rating] => 564
    [chrono_security_answer] => 
    [chrono_verification] => W8w6A
    [business] => tnches_1337019634_biz@jesusmylord.org
    [cmd] => _xclick
    [input_submit_9] => Pay with Paypal
    [cc17c0dc3e6a196555680b06c733fc60] => 1
    [item_name] => TCA Patron Membership
)
GreyHead 20 May, 2012
Hi chriso0258,

First, PHP Warnings are just warnings tha something may be a problem; they aren't errors. They will be hidden if you set Error Reporting to System Default or None in your site Global Configuration settings.

In this case it looks as though I wasn't handling the case when the Reply To name box is empty as tidily as I could. I've updated the code and will republish the action in the next day or so.

The two actions now have quite different code inside them. In particular the Email [GH] action has been extended to handle more of the less common cases where you want to have mixed static and dynamic email addresses; or variable numbers of addresses.

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