Issue Bug Closed

#107171HTTP 503 on sending EXT:form with EmailToSender finisher using non-fully-qualified address like my.name@domain

Stephan Großberndt 07/30/25, 09:14 updated 12/02/25, 13:58

Description

- If you have a form made with EXT:form which contains an email field it adds a <input type="email"> html element which does validation.
- If you add a EmailToSender finisher additionally validation is done on the server side by GeneralUtility::validEmail($address); in the finisher.

But if you enter an email address like my.namedomain@ and send the form you will get a HTTP 503 response:

Expected response code "250/251/252" but got code "504", with message "504 5.5.2 <my.name@domain>: Recipient address rejected: need fully-qualified address".

This is obviously because in general such an email address is valid, but symfony/mailer/Transport/Smtp/SmtpTransport.php denies to send it.

User experience in such a case is bad as the user gets a 503 full page error instead of a validation error beforehand.

I realize there is the DNSCheckValidation available as an additional validators option since 66179: [FEATURE] Improved Email Validation but it is not enabled by default.

- Should DNSCheckValidation be enabled by default on new instances to avoid this?
- Should the EmailToSender finisher of EXT:form be extended to do this validation beforehand?
- At least the EmailToSender finisher should catch any exception thrown by GeneralUtility::makeInstance(MailerInterface::class)->send($mail); and throw a FinisherException instead in order to allow a better experience for the user

Reviews 1

History 715

  1. Josua Vogel commented <span data-processor="relativetime" data-value="2025-08-01T14:15:30+00:00" > 08/01/25, 14:15 </span>

    As far as I can test, the error is not in the Symfony Mailer package. The email server returns this error message and the Symfony Mailer correctly acknowledges it as an exception.

    DNSCheckValidation should not be enabled by default. In this case, however, DNSCheckValidation should be configured as a validator in the project, as this is required by the mail server.

  2. Georg Ringer commented and changed status New Rejected <span data-processor="relativetime" data-value="2025-10-02T19:24:45+00:00" > 10/02/25, 19:24 </span>

    thanks for creating the issue.

    IMO there is not much we should use. using the DNS validator is maybe not always the desired thing. however with #107580 the description improved.
    i am closing the issue, however feel free to discuss it e.g. via slack

  3. Gerrit Code Review pushed patch set 16 for main to change 81755 status Rejected Under Review <span data-processor="relativetime" data-value="2025-10-23T06:49:35+00:00" > 10/23/25, 06:49 </span>

  4. Georg Ringer commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-10-27T18:20:08+00:00" > 10/27/25, 18:20 </span>

    Applied in changeset commit:a9d664878f42198b6f269a5e1bc36ef5878a4bf6.