Feature #68771

EXT:form - Add contentObject functionality to form MailPostProcessor and introduce replyToEmail

Added by Gerrit Mohrmann over 4 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
Start date:
2015-08-05
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

Description

It would be nice to make something like this in the TS config for the MailPostProcessor of the form extension:

recipientEmail = TEXT
recipientEmail {
    value = no_reply@example.org
    override {
        dataWrap = DB:fe_groups:{gp:form|recipient}:description
        wrap3 = {|}
        insertData = 1
    }
}

Besides that, to set an replyToEmail is not possible in the moment - should be.


Related issues

Related to TYPO3 Core - Bug #32950: EXT:form - Confirmation mail to sender in FORM Closed 2012-01-03
Related to TYPO3 Core - Bug #69395: EXT:form - Allow ReplyTo Closed 2015-08-28
Related to TYPO3 Core - Feature #54030: EXT:form - Wrap for subjectField Closed 2013-11-28

Associated revisions

Revision 0f5ded16 (diff)
Added by Ralf Zimmermann over 4 years ago

[FEATURE] Add contentObject functionality to form MailPostProcessor
and introduce replyToEmail

If the form configuration is defined by TypoScript the following
items for the MailPostProcessor in ext:form have now
contentObject functionality:

  • subject
  • senderEmail
  • senderName
  • recipientEmail
  • ccEmail
  • replyToEmail (newly introduced, replyToEmailField as fallback)
  • priority
  • organization

This is disabled in the form wizard for security concerns.

Resolves: #68771
Releases: master
Change-Id: I13913b806b86bcfbe35d760b50e193a066cbcc4c
Reviewed-on: http://review.typo3.org/42290
Reviewed-by: Bjoern Jacob <>
Tested-by: Bjoern Jacob <>
Reviewed-by: Ralf Zimmermann <>
Tested-by: Ralf Zimmermann <>
Reviewed-by: Frans Saris <>
Tested-by: Frans Saris <>

Revision 49ec453b (diff)
Added by Ralf Zimmermann about 4 years ago

[BUGFIX] Allow reply-to mail header in EXT:form

In EXT:form it was not possible to set a reply-to header in the email
and so the entered mail address was used as "from" which could cause SPF
failures.

The reply-to was there in the old mailform (e.g. TYPO3 4.5) but not in
the new extension which is the successor. That is why this issue handled
as bugfix.

Resolves: #69395
Related: #68771
Releases: 6.2

Change-Id: I1e7b77d3196c4a921d2902f212d03815bb3e0eb9
Reviewed-on: https://review.typo3.org/43661
Reviewed-by: Bjoern Jacob <>
Tested-by: Bjoern Jacob <>
Reviewed-by: Stefan Neufeind <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

History

#1 Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#2 Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#3 Updated by Christian Hernmarck over 4 years ago

Thanx for this.

As I understand, with the current patch (2) it's possible to use the "email" field for replyTo with some typoscript as stated in the description above - I think this is the most wanted value for "replyTo".

I hope that at least the replyTo thing (with CO func or "replyToEmailField") also gets into the 6.2 branch...

#4 Updated by Gerrit Mohrmann over 4 years ago

You understand it right. In the patch documentation file is an example for that.

Test it, and vote for it in the review system. Maybe then it will be in 7.5 :-)

I hope that at least the replyTo thing (with CO func or "replyToEmailField") also gets into the 6.2 branch...

As it is a future, i don't think so.

#5 Updated by Oliver Hader over 4 years ago

The current patch implementation is considered as security issues for non privileged backend users - see #55353 as well, which has similar aspects.

#6 Updated by Christian Hernmarck over 4 years ago

Gerrit Mohrmann wrote:

You understand it right. In the patch documentation file is an example for that.

Test it, and vote for it in the review system. Maybe then it will be in 7.5 :-)

I hope that at least the replyTo thing (with CO func or "replyToEmailField") also gets into the 6.2 branch...

As it is a future, i don't think so.

Hm - I think a missing "ReplyTo" is a bug and not a missing feature - just because:

- it was there with the "old" mailform

- if you want to be able to answer a sent mail by a single click the "From:" (senderEmail(Field)) is not the right header-line because of SPF, so "ReplyTo" is the only option here, and since it's a field we need replytoEmailField to be supported.

Shall I open another ticket for this?

I'm ok with "contentObject functionality is a feature..."...

#7 Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#8 Updated by Gerrit Mohrmann over 4 years ago

- it was there with the "old" mailform

Then I agree with you. Feel free to open a ticket for 6.2.

The current patch implementation is considered as security issues

ok with the new patch?

#9 Updated by Christian Hernmarck over 4 years ago

Gerrit Mohrmann wrote:

- it was there with the "old" mailform

Then I agree with you. Feel free to open a ticket for 6.2.

#69395

#10 Updated by Gerrit Code Review over 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#11 Updated by Bjoern Jacob over 4 years ago

  • Subject changed from Add contentObject functionality to form MailPostProcessor and introduce replyToEmail to EXT:form - Add contentObject functionality to form MailPostProcessor and introduce replyToEmail
  • Status changed from Under Review to Needs Feedback
  • Assignee set to Gerrit Mohrmann

We've completely rewritten the frontend rendering of EXT:form. Could you please test the current master (7.5.dev)? Maybe you can provide a new patch for your issue (without the replyTo feature which is handled within a different ticket). Or just get in contact with Christian who tries to get the replyTo stuff done. Maybe you can join forces.

#12 Updated by Benni Mack over 4 years ago

  • Target version deleted (7.5)

#13 Updated by Bjoern Jacob over 4 years ago

  • Target version set to 8 LTS

#14 Updated by Gerrit Code Review over 4 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#15 Updated by Gerrit Mohrmann over 4 years ago

Version 8? Why not 7 LTS?

I have set the prefix setting for the form, but the prefix is prefixed by 'tx_form_form'. How can I remove the 'tx_form_form'. I think this breaking behavior is new in 7.5dev, or a hidden setting?

#16 Updated by Bjoern Jacob over 4 years ago

Regarding the prefix please create a new issue with some code to reproduce the problem. Thx for that and your code!

#17 Updated by Bjoern Jacob over 4 years ago

The prefix stuff cannot be changed IMHO. The rendering is based on Fluid and the prefix is needed that way. The prefix you are setting is applied right behind tx_form_form. If your prefix is "test" the whole element prefix would look like tx_form_form[test].

#18 Updated by Bjoern Jacob over 4 years ago

  • Target version changed from 8 LTS to 7 LTS

Yeah, let's try to get this into v7.6. But we do have only one week to get this into the core.

@Gerrit: could you please rebase your patch?

#19 Updated by Gerrit Code Review over 4 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#20 Updated by Gerrit Code Review over 4 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#21 Updated by Gerrit Code Review over 4 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#22 Updated by Bjoern Jacob over 4 years ago

Example form to test this issue:


lib.postProcessorTest = FORM
lib.postProcessorTest {
    enctype = multipart/form-data
    method = post
    prefix = tx_form
    confirmation = 1

    postProcessor {
        1 = mail
        1 {
            senderEmail = TEXT
            senderEmail {
                value = your@
                wrap = |mail.com
            }

            senderName = TEXT
            senderName {
                value = ACME
                noTrimWrap = || Ltd|
            }

            recipientEmail = TEXT
            recipientEmail {
                value = forms@
                wrap = |mail.com
            }

            ccEmail = TEXT
            ccEmail {
                value = all@
                wrap = |mail.com
            }

            replyToEmail = TEXT
            replyToEmail {
                value = someone@
                wrap = |mail.com
            }

            priority = TEXT
            priority {
                value = 6-1
                prioriCalc = 1
            }

            organization = TEXT
            organization {
                value = TYPO3
                noTrimWrap = | Association
            }

            subject = TEXT
            subject {
                data = GP:tx_form_form|tx_form|subject
                htmlSpecialChars = 1
                noTrimWrap = |Mail from Form: ||
            }
        }
    }

    10 = TEXTLINE
    10 {
        name = name
        placeholder = Name
        label {
            value = Name
        }
    }

    20 = TEXTLINE
    20 {
        name = subject
        placeholder = Subject
        label {
            value = Subject
        }
    }

    100 = SUBMIT
    100 {
        name = 3
        value = Submit form
    }
}

#23 Updated by Gerrit Code Review over 4 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#24 Updated by Gerrit Code Review over 4 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#25 Updated by Gerrit Code Review over 4 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#26 Updated by Gerrit Code Review over 4 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#27 Updated by Gerrit Code Review over 4 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42290

#28 Updated by Ralf Zimmermann over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#29 Updated by bitfire it services almost 4 years ago

Would it be possible to allow this when using the form wizard, too? I have just played around hours to find out that it's only available from TypoScript.

This is disabled in the form wizard for security concerns.

Maybe there could be a TypoScript constant to allow this?

#30 Updated by Bjoern Jacob almost 4 years ago

  • Assignee deleted (Gerrit Mohrmann)

Thx bitfire for your reply. No, this feature will not be available within the form wizard. There are 2 reasons for it:

  • In TYPO3 8 we're removing the form wizard and will come up with a totally rewritten version. Right now, we do not want to put any effort in the old ExtJs based version.
  • Allowing such things in the form wizard would open a huge security issue. That way, editors would have the possibility to render RECORDS and/ or CONTENT cObjects showing the content of the be_users table, for instace.

In the future, we want to streamline the wizard and just see it as a tool for editors to create forms without to fancy functionalities. If you need more advanced forms, integrators should create those forms and allow the editor to insert such elements easily. That's why version 8 allows the integration of predefined forms. See https://twitter.com/tritum/status/707577317548298240.

#31 Updated by Bernhard Eckl about 3 years ago

It seems that this still does not work. I tried the following, but no wrap and no gp var works:

subject = TEXT
subject {
     data = GP:tx_form_form|tx_form|Fehlerort
    #value = GP:tx_form_form|tx_form|Fehlerart
    insertData = 1
    htmlSpecialChars = 1
    wrap = Mail from Form: |
}

#32 Updated by Bernhard Eckl about 3 years ago

  • % Done changed from 100 to 50

It seems that this still does not work. I tried the following, but no wrap and no gp var works:

subject = TEXT
subject {
     data = GP:tx_form_form|tx_form|Fehlerort
    #value = GP:tx_form_form|tx_form|Fehlerart
    insertData = 1
    htmlSpecialChars = 1
    wrap = Mail from Form: |
}

#33 Updated by Bjoern Jacob about 3 years ago

  • % Done changed from 50 to 100

Please open a new issue if there are still problems. IMHO we can discuss your problem in slack. There is also a pinned document with a nice example for this.

#34 Updated by Riccardo De Contardi over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF