Forums

How can I e-mail the end user of the form

decbuck 23 Jun, 2009
I want to send an e-mail to the e-mail address on the form so that they have acknowledgement of thier form entry.

I would also like to populate it with some of the variales they used in their form entry.

Thanks
Max_admin 23 Jun, 2009
Hi,
#1- use the dynamic To
#2- this needs a small custom php code, let me know more info to help!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
decbuck 23 Jun, 2009
Hi,

Have you an example of the php code,

and what value do I put in the dynamic to field?

Thanks
Max_admin 23 Jun, 2009
#1- the dynamic To should have the field name which will hold the email address of the target user!
#2- the code depends on what you need to do, give me more details with fields names if possible!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
menchee 29 Jun, 2009
Hi Max,
decbuck didn't continue the thread, so I will from the last point...

I want to send the POST to two different address:
1) An address which I pull from the database.
2) The email address which the user fill in the form, so I can send a feedback.

I thought that for the first one, I should add a hidden field (name="mail_to") and use simple query to echo the value in from the db.
For the second mail, I don't see why do I need any code. If I put the name of the filed (let's say: name="email") in the Dynamic_to, it is not enough?

Thanks,
Emanuel.
Max_admin 30 Jun, 2009
Hi Emanuel,

Your ideas are correct and will work but we don't suggest adding any email addresses in the form even using hidden fields, you may add this code n the onSubmit before email:


JRequest::setVar('mail_to', 'email address here');


and use the mail_to in the Dynamic To!

There is another method using the mail class in Chronoforms posted here in the forums!

Cheers,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger