- Issue created by @maijs
- Status changed to Needs review
almost 2 years ago 11:49am 31 January 2023 - Status changed to Postponed: needs info
almost 2 years ago 10:49pm 16 February 2023 - 🇺🇸United States jrockowitz Brooklyn, NY
I am not following why we need this change or how it helps.
Hopefully, someone can review the ticket and patch and provide more context.
- Status changed to Needs review
almost 2 years ago 9:34am 17 February 2023 - 🇱🇻Latvia maijs
Sorry for not providing enough context for why this is important. In a project there's a requirement to lock the webform when the mailing of the submission values resulted with a failure. After the webform administrator makes sure that the webform is properly sent/resent via email to the relevant parties (according to the email mailer), the webform is manually unlocked, and the webform is then processed according to purging policies.
I have updated the text of the issue for clarity.
As I mentioned before, the
\Drupal\Core\Mail\MailManagerInterface::mail()
PhpDoc states that it's theresult
element that contains the result of the mailing. Thesend
element that thesendMessage()
method returns is the intent to send or not to send the email, and not the result itself.Interestingly enough the
\Drupal\webform\Plugin\WebformHandlerMessageInterface::sendMessage()
PhpDoc doesn't state any return value, yet it returns the$result['send']
(intent) value.My suggestion is to make the return of the
sendMessage()
method more meaningful, so that overriding classes could act on what happens within the sendMessage() method without copying and pasting the whole method's code just to return the success or the failure of the mailing. - 🇺🇸United States jrockowitz Brooklyn, NY
I feel like we are dealing with an edge case that may not require this change. Of course, you can use the patch AS-IS.
- Status changed to Closed: won't fix
over 1 year ago 11:45pm 26 May 2023 - 🇮🇳India sethu_sk
We are sending the attachment in email, once after the email is sent, we need to delete the file stored in Drupal. So this reason, we need to know the status of email.