Chronoforms 2.5
Is there a way to re-email the 'saved form data'? Maybe with a custom script?
We have been having some email problems and need to resend the data formatted by the email template so the office can file it in their usual manner.
Can i possibly pull the entries from the database and run them through the script that creates the email template?
Hi wizdum,
yes you can do this, but you need to write SQL to get the form data stored and loop through every one and apply the template code and send an email, the idea is easy but it needs the code written well!
look at the autogenerated code for the table name and search here for SELECT to see how you can write a SQL select statement and loop results and send the email with Jutility::sendMail
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thanks Max.
Ill see if the client wants to pay for the custom work :wink:
No problems!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hello,
I need to be able to resend emails with previously saved results as well.
Does anybody have the script already?
Thanks!
Hello,
You can do this by using a "DB Record loader" to load the data then use an email action, pay attention to the structure of the data in the $form->data array as this affects how you can write the strings in the email.
If data is loaded under a model id then you need to use: {model.field_name}
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hello Max,
Thanks for your prompt reply and a great suggestion. I was able to get the "DB Record Loader" to work with Data Load Type = First Record but not All of them, which is what I need...
Am I missing something?
Thanks a lot!
That is unfortunate... I guess I'll just give up trying.
Thanks!
Hi,
If each record has an email address you need to use then just loop through all records and store all addresses in an array, then implode it and use that value as the dynamic "TO" or "BCC":
//your array of address is $emails
$form->data['dto'] = implode(",", $emails);
then use "dto" in the dynamic to or bcc, if you use bcc then you must have at least 1 static "to" address, I think so.
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi,
Thanks for the suggestion, but I actually need to send out dynamic emails (about 65 of them) to one recipient...
Thanks, Bob!
I'll give it a try! Hopefully it will work on Joomla! 3.