in2code-de / powermail_cond

Add conditions (via AJAX) to TYPO3 powermail forms for fields and pages
8 stars 23 forks source link

SendMailService needs SignalSlot to overwrite variables in latest step #22

Closed JBlocks closed 6 years ago

JBlocks commented 6 years ago

We have a lot of signal slots in the extension, but no way to overwrite the mail data in the latest part of the SendMailService before the real mail is send.

Scenario: A customer fills the input field for email in the frontend form. The email should not trigger a real mail transport, because it is an test email address. (Frontend testing)

It must be possible to step into the sendmailservice with in signal hook, to overwrite or reset the senderEmail, receiverEmail, subject, etc.

Needs:

A better solution is probably overriding the TypoScript settings (this-> settings ['receiver'] ['enable'] = 0). Overwriting the "$ this->settings" must then be possible via a signal slot in the FormController::createAction() based on the submitted form data (email input field).

einpraegsam commented 6 years ago

First of all, it seems that you're in the wrong github project (powermail_cond instead of powermail). In addition: The very last signal to stop mail sending is sendTemplateEmailBeforeSend. Testing the email-addresses on blacklisted strings, etc... shouldn't be that hard. I'm sure there are several ways to fullfill your request.