Bug #32950
closedEXT:form - Confirmation mail to sender in FORM
0%
Description
It appears that it is not possible to send a confirmation mail to the sender of a form in the the FORM extension.
It is possible to set sender name and email via senderEmailField and senderNameField respectively, but it would be nice if there was a possibility to send a confirmation mail to that user as well. This could be defined with senderConfirmEmail or something similar.
Updated by Roland Schoenmakers about 11 years ago
- Assignee set to Ernesto Baschny
Einar Gislason wrote:
It appears that it is not possible to send a confirmation mail to the sender of a form in the the FORM extension.
It is possible to set sender name and email via senderEmailField and senderNameField respectively, but it would be nice if there was a possibility to send a confirmation mail to that user as well. This could be defined with senderConfirmEmail or something similar.
Why has this request no follow-up yet...?
Updated by Stefan Neufeind about 11 years ago
Since sending an email is just calling a mail-postprocessor, can't we just call another mail-postproc to send email to the user? This way you could also use a separate email-template etc.
Updated by Ernesto Baschny over 10 years ago
- Status changed from New to Accepted
- Assignee deleted (
Ernesto Baschny) - Priority changed from Should have to Could have
Sounds like a good idea, but why is that assigned to me? :)
Einar, do you have some time to implement this feature? Or anyone else?
Updated by Bernhard Eckl about 10 years ago
Bump!
Maybe this is interesting, the postprocessor mail was replaced there by custom php which is also available there for download: http://alumnitypo3.blogspot.de/2012/01/form-einfaches-nachrichtensystem-fur.html
In my opinion it would be great to have a checkbox to send a confirmation page so that editors can easily select it and don’t have to know typoscript post processors (also a checkbox for the confirmation page would be good for editors). Would be great for T3 6.2! :-)
Updated by Björn Jacob over 8 years ago
- Category changed from Form Framework to 1602
Updated by Björn Jacob over 8 years ago
- Category changed from 1602 to Form Framework
Updated by Björn Jacob over 8 years ago
- Status changed from Accepted to Needs Feedback
- Assignee set to Einar Gislason
To be honest I don't understand what you guys want to achieve. Would #68771 suit your needs?
Updated by Björn Jacob over 8 years ago
- Status changed from Needs Feedback to New
- Assignee deleted (
Einar Gislason) - Parent task set to #69410
Since there is no feedback I'll keep this issue open as a new feature for v8. As far as I understand the idea of this issue, there should be a postProcessor which sends automatically a confirmation email. The email states that the mail of the sender has been generated and sent to the receiver.
Updated by Stephan Großberndt about 8 years ago
When you fill you a form with lots of data, supply your E-Mail-Address and send it, you are set in CC of the mail and get a copy so you can prove you actually sent it.
Updated by Stephan Großberndt about 8 years ago
Updated by Stephan Großberndt about 8 years ago
In TYPO3 6.2 this is not possible to achieve with TypoScript, you need a own MailPostProcessor:
Vendor\Extension\Form\CcMailPostProcessor.php:
namespace Vendor\Extension\Form; use TYPO3\CMS\Form\PostProcess\MailPostProcessor; /** * Ein MailPostProcessor für TYPO3 CMS 6.2, der die E-Mail als CC an den Absender schickt * Ab TYPO3 CMS 7.6 ist folgendes möglich und dieser MailPostProcessor nicht mehr nötig: * * ccEmail = TEXT * ccEmail.data = GP:tx_form_form|tx_form|email * */ class CcMailPostProcessor extends MailPostProcessor { /** * Constructor * * @param \TYPO3\CMS\Form\Domain\Model\Form $form Form domain model * @param array $typoScript Post processor TypoScript settings */ public function __construct(\TYPO3\CMS\Form\Domain\Model\Form $form, array $typoScript) { parent::__construct($form, $typoScript); if ($this->requestHandler->has($this->typoScript['senderEmailField'])) { $this->typoScript['ccEmail'] .= (!empty($this->typoScript['ccEmail']) ? ',' : '') . $this->requestHandler->get($this->typoScript['senderEmailField']); } } }
Use it in your form:
postProcessor { 1 = Vendor\Extension\Form\CcMailPostProcessor
From TYPO3 CMS 7.6 you can do the following in the TypoScript and do not need a MailPostProcessor:
ccEmail = TEXT ccEmail.data = GP:tx_form_form|tx_form|email ccEmail.data.htmlspecialchars = 1
Replace email
with your email-field name.
Please make sure you have a captcha or honeypot to protect the form - otherwise this can be used to send automated SPAM!
Updated by Björn Jacob about 8 years ago
Thx Stephan. We'll add the TS solution and the hints to the documentation. As discussed on Slack, there is no need for any programming.
Updated by Björn Jacob almost 8 years ago
- Subject changed from Confirmation mail to sender in FORM to EXT:form - Confirmation mail to sender in FORM
- Status changed from New to Closed
On my list for documentation.
Updated by Adrien Jacob over 7 years ago
- Tracker changed from Feature to Bug
- TYPO3 Version set to 7
- PHP Version set to 7.0
- Is Regression set to No
Sorry to reopen this ticket, but I spent a lot of time trying to find a possible mistake on my side and didn't find it, so here is my problem : I tried dynamically changing the recipientEmail value(as explained in this ticket for ccEmail, but I tried all other recipient fields), and it always ends up with "There was an error when sending the form by mail". It works ok if I set a fixed value instead. I did add the Default TS, called after bootstrap_package.
Here is the code used in the form :
enctype = multipart/form-data method = post prefix = tx_form confirmation = postProcessor { 1 = mail 1 { recipientEmail = TEXT recipientEmail { data = GP:tx_form_form|tx_form|email htmlSpecialChars = 1 } senderEmail = test@example.com subject = Title } } 10 = TEXTLINE 10 { type = email name = email label { value = Email } } 20 = SUBMIT 20 { type = submit name = 5 value = Send }
Thanks in advance !
Updated by Adrien Jacob over 7 years ago
Sorry, I finally understood from the other related ticket that I had to use typoscript, and not the Form wizard... You may close the ticket (again).
Updated by Björn Jacob over 7 years ago
Thank you for your feedback and great that you found a solution.
Updated by taywa gmbh over 7 years ago
I made an extension to be able to send a cc to the sender, see here:
https://typo3.org/extensions/repository/view/taywa_ccemailfield
https://github.com/taywa/t3ext-taywa_ccemailfield