Skip Navigation

[Resolved] Send different custom and editble emails to users

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#1168650

I hope this is within your scope of support.

I have made a view where users are listed in a table. In this table, I would like to have a Select field next to every user where I can select different mail templates to send to a single user. The content of the emails must also be able to be individually modified on the fly. In the mail templates I also need to include user fields from the loop.

Is this possible to do with Toolset plugins sets?

Thomas

#1169013

Hi, the short answer is there's a better way to accomplish what you're looking for. Toolset Forms are not designed to create, edit, and send emails on the fly. Forms are designed to create and edit content (posts of some kind) or Users. There are some additional email notification capabilities built-in, but nothing like an on-the-fly email editor.

A simpler idea would be to use Views to generate mailto: links with pre-defined recipient, subject, and content fields. You could theoretically use shortcodes to define those values based on the User in the loop. This would not send the email automatically, but would open your default email application and fill out some predefined information which you could then edit and send like a standard email.
https://www.rapidtables.com/web/html/mailto.html

The long answer is it might be possible to do this in Forms with a significant amount of custom code, but it would be quite complicated and unstable. It would require knowledge of HTML, PHP, email header manipulation, and the ability to work with our Forms API. If anything on these documentation pages looks outside the scope of your own programming capabilities, this is probably not a practical approach for you:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
https://toolset.com/documentation/user-guides/how-to-use-custom-placeholders-in-cred-notifications/