Project

General

Profile

Actions

Feature #71982

closed

Mail From mutli recipient from select list option

Added by bogdanovic no-lastname-given over 8 years ago. Updated over 8 years ago.

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

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

To enable the recipient to have a selection list for email, it's necessary to modify th setTo() function.
And and a recipientEmailField in TypoScript with a controller treatment based on setFrom() function.

typo3/sysext/form/Classes/PostProcess/MailPostProcessor.php (l 169)
        /**
         * Adds the receiver of the mail message when configured
         *
         * Checks the address if it is a valid email address
         *
         * @return void
         */
        protected function setTo() {
                $toEmails = '';
                if ($this->typoScript['recipientEmail']) {
                        $toEmails = $this->typoScript['recipientEmail'];
                } elseif ($this->requestHandler->has($this->typoScript['recipientEmailField'])) {
                        $toEmails = $this->requestHandler->get($this->typoScript['recipientEmailField']);
                } else {
                        $toEmails = $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'];
                }
                if (!\TYPO3\CMS\Core\Utility\GeneralUtility::validEmail($toEmails)) {
                        $toEmails = \TYPO3\CMS\Core\Utility\MailUtility::getSystemFromAddress();
                }

                $validEmails = $this->filterValidEmails($toEmails);
                if (count($validEmails)) {
                        $this->mailMessage->setTo($validEmails);
                }
        }

Actions #1

Updated by Björn Jacob over 8 years ago

  • Tracker changed from Bug to Feature
  • Description updated (diff)
  • Status changed from New to Needs Feedback

This is a feature request and no bug. I'm sorry. This will never make it into 6.2 and also not into 7 LTS. Right now I don't get what you're trying to achieve but I do recommend writing your own postProcessor and you're done.

Actions #2

Updated by bogdanovic no-lastname-given over 8 years ago

Thanks for your feedback.

I'll do my own postProcessor to reach my goals.

Actions #3

Updated by Björn Jacob over 8 years ago

  • Status changed from Needs Feedback to Closed

Okay, great! Anyway, it would be cool if you could paste your solution. Based on this we can decide to have such a postProcessor for TYPO3 8.

Actions

Also available in: Atom PDF