Forums

Sending Multiple and Different emails on Form Submission

Beyer 23 Mar, 2010
I have been using ChronoForms and am able to successfully create, submit and email the results of my form. I would like to know if it is possible to get more "complex".

I have a form in which a user NOMINATES a person for an award. Upon submission of this form, three things need to happen:

1. An email is sent to me with the results of the form in the email. CHECK (this is standard)
2. An email is sent to the USER with further instructions to continue the nomination process.
3. An email is sent to the nominee informing said nominee of his nomination.

That is three separate emails that need to be sent.

Number one is obviously a simple task. Number's 2 and 3 are not as apparent. Is this possible? I have used other, less detailed form modules that sorta accomplish this task. Does ChronoForms do this? If so, how do I enable the functionality?

Thanks,
ClayB
nml375 23 Mar, 2010
Hi ClayB,
Depending on the version of CF you are using, this ranges from very easily to requires some custom php-code.

With current version (v3.1RC5.5) is is as simple as creating three different email templates on the setup emails tab. You then add the appropriate controls (From Name, From Email, To, Subject, and/or their dynamic counterparts), and head over to the email templates tab, and write the proper details for each email.

With older versions such as the v3.0 stable, you'd have to do the second and third email using custom php-code. Roughly put, build your email templates and store them in variables, as well as details regarding From, To, and Subject, and use these with the JUtility::sendMail() classmethod (see http://api.joomla.org/Joomla-Framework/Utilities/JUtility.html#sendMail).

/Fredrik
Beyer 23 Mar, 2010
I have the latest version and the setup of multiple emails worked perfectly. I was actually just getting ready to close this post, thanks though, for responding quickly. I do have another question, but will post another topic.

Thanks,
ClayB
This topic is locked and no more replies can be posted.