New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On Email Failed regular mark email as failed #11285
base: 4.x
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## 4.x #11285 +/- ##
============================================
+ Coverage 48.87% 48.92% +0.05%
+ Complexity 35395 35378 -17
============================================
Files 2144 2144
Lines 105510 105456 -54
============================================
+ Hits 51563 51596 +33
+ Misses 53947 53860 -87
|
This pull request has been mentioned on Mautic Community Forums. There might be relevant details there: https://forum.mautic.org/t/failed-email-status-only-after-three-attempts/23522/22 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense. The downside of this approach will be that if the email is failing for some reason like that the email inbox no longer exists then it will send the emails indefinitely. The upside is that this will work nicely with temporary failures.
Can you also write one more test to also test that the email stat was not failed if the stat is not failed? It's always good to test multiple scenarios.
|
||
public function testOnEmailFailed(): void | ||
{ | ||
$this->mockSwiftMessage->leadIdHash = 'idhash'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do something like this:
$message = new class() extends \Swift_Message {
public $leadIdHash = 'some-hash';
};
Instead of modifying the actual class to make a test work?
This should cover bounce management of each transport. |
Description:
Steps to test this PR:
On email failed we set contact to DNC.
But failed send email could have a lot of reasons (smtp timeout etc).
Then I suggest mark email as failed and do not set contact as DNC.