Column list plugin not sending email

Guys,

I am using the column list to update a few fields in the list. I want it to send an email which entails picking up the email address from a field from joined table. I have set it up well. see attachment 1
I have added the email field which is text and not from _users table. I have double checked that that field contains actual emails see attachment 2. Though I think I have done the set up well, the plugin updates the database but does not send the email to the email address.

I typed in an email address direct in to 'email to' field and it sent the email after the update but it then did not evaluate the place holders I included the body of the text they appeared in the email as text see attachment 3

Could you please help me work this plug in

Regards
Simoncolumn plug in 1.PNG column plug in 2.PNG column plug in 3.PNG
 
So is the email address in a table joined through a "list join", and if so, is it a non-repeated (one-to-one) join? And it's a simple field, not a join element?

I just tested (but only with a simple "Or email to", and my placeholders get replaced OK.

Are you running relatively recent code?

-- hugh
 
Where you have joined tables (I am using and inner le, it looks like the column plugin does not update any field on second table. It is actually sending emails when it is picking up the email from the left (first) table but does not update nor pick up emails from the second (left) table
 
Hugh,

Thanks for the reply. I confirm that it is a list join and non repeatable left join. The email field is plain text and not a join element however the unique key 'customer-id' that I am using to join (i.e. left table field) was popoulated via a join element on a form I.e. the user picked it from a cascading drop down element which was later saved to the table. Could this be the issue? Email field is simple text though

I tested the plugin on a table with no join. It works perfectly. I really need the join, I don't want to result to replicating fields in tables they don't belong to.

I did a full github update 2 days ago. Is there newer code or should I try update again?

Regards
Simon
 
Hugh,

After a couple of hours creating multiple list and testing I think I know where the problem lies just don't know how to solve it.

Turns out the join is not the problem. I had done a pre-filter of the first list before doing the join. I used an element (call it element 1) to pre-filter. If I pre-filter the list with this element1 then indicate in the plugin under 'update' that I want to update the same element 1 then the element gets the update but the email does not get sent. If however, I filter the list with a different element 2 and then use element 1 to update in the plugin then the update is done and the email sent and every placeholder in the email body works perfect.

I think you can not use the same element to pre-filter and still use the same element as the update element in the column list plugin. Do this make sense and is there a work around?

Regards
Simon
 
Ah, good sleuthing! And I think I can see why that kills it.

We send the emails AFTER doing the updates. And the email sending code uses our standard list model getRow() method to get the row data for each row being updated. Which is of course subject to pre-filtering. So if you've changed the element to something that excludes that row ... :/

Try this ... in ./plugins/fabrik_list/update_col/update_col.php, around line 237 you'll find ...

Code:
        if (!empty($update))
        {
            foreach ($update->coltoupdate as $i => $col)
            {
                $this->_process($model, $col, $update->update_value[$i], $update->update_eval[$i]);
            }
        }

        $this->sendEmails($ids);

Try moving that sendEmails() line up to before the if()

Code:
        $this->sendEmails($ids);

        if (!empty($update))
        {
            foreach ($update->coltoupdate as $i => $col)
            {
                $this->_process($model, $col, $update->update_value[$i], $update->update_eval[$i]);
            }
        }

My only concern about making that change is that it may break backward compatibility, in that some folk may rely on the emails they are sending having the updated values for elements they are using as placeholders.

The only safe way would be to add another option to the update_col settings, to specify "Email after update: Yes/No" which defaults to Yes, and modify the code to do the email accordingly.

-- hugh
 
Hugh,

Thanks alot dude. I adjusted the file. It works like a charm. You the best

One last question. I subscribed for standard membership 2 days ago but I still cant post in to the Standard support forum. It say at the bottom that (You have insufficient privileges to post here.). Could you resolved this for me

Kind regards
Simon
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top