Email plugin

marioms

Member
Hi Guys!

I have a problem. I have a form in which once you submit it, you receive an email confirmation. I have done that with the email option in the plugin and selecting an article template. The issue is, on the form, there is an important field with 2-3 options and I would need to send different types of emails on submitting depending on the option chosen in that field. (For example, a person uploading his application for some event and receiving a personalized email based on the event chosen, like date or place).

Is there a way to do this?

Thanks in advance!
 
There is a condition field in email plugin, where you can write your condition.
Code:
return (('{table___element_raw}' == '2')
&& !array_key_exists('apply', $formModel->formData));
 
Hi Bea! thanks a lot for your response... you see, I am really bad at these things and I have a hard time understanding... I have 2 different article templates (with the 2 different email contents) but I am not sure how am I suppose to add that in the condition you wrote. Basically I know it should be something like:

If selected field = option 1 ,then, send article template 1,
else selected field = option 2, then, send article template 2,
if nothing is selected = don't send the email.
 
The easiest way to do that is have multiple email plugins for the different content, and use the condition to define which one runs.

So the Condition on plugin for article 1 ...

return '{table___element_raw}' == '1';

... and for 2 ...

return '{table___element_raw}' == '2';

... so the plugins only run for that one value, and send the specific article they are configured for.

-- hugh
 
Thanks a lot Hugh, that works fine. I have one more issue, on the article template I have this:

File received: {nmagdb_cv___upload_cv_raw}

User: {user firstname} {user lastname}

Date and time: {nmagdb_cv___date_time_raw}

Nationality: {user nationality}

The problem is that the File received field looks odd, it shows up like this: File received: [{"file":"\/images\/missionCV\/example.pdf","params":""}]

What can be the problem?

Thanks!!!
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top