Add delay when queuing multiple debt email#1300
Conversation
|
Hey @beesaferoot Two comments here
|
This link (https://support.google.com/a/answer/3221692) was part of the error message, I did a little search on the cause of issues like this. I came across this (https://forum.mautic.org/t/error-sending-emails/25498/2), also asked ChatGPT. I know our IP isn't banned entirely because we still successfully send out emails in other cases (i.e., welcome email etc), but there appears to always be an error when trying to send out debt emails. What do you suggest? without making uninformed guess, I'm not sure what to make of it yet.
This is a better solution. I will look into it. Thank you |
Yeah, this is really tricky to understand. I'm just curious because they provide such a detailed list of SMTP Error codes: https://support.google.com/a/answer/3726730?sjid=16209648178720520903-EU For example Interestingly, the error already gives us some indication.
👍 |
Yes but it doesn't have any backoff logic; it simply retries immediately |
5b11f1a to
ebd6933
Compare
1e16a98 to
ff3867c
Compare
| * @return array<int, RateLimited|ThrottlesExceptions> | ||
| */ | ||
| public function middleware(): array { | ||
| return [(new RateLimited('emails'))->releaseAfter(3), |
There was a problem hiding this comment.
releaseAfter(3) seems wrong here 🤔 Below we are using releaseAfter(5 * 60). Should they be different or should they be the same?
There was a problem hiding this comment.
5 minutes is for Throttle middleware which happens only after exceeding maximum attempts. 3 seconds is meant for a delay on each attempt.
There was a problem hiding this comment.
Essentially, my question is, why are the values different between HtmlEmail.php and PlainEmail.php? I would have expected them to be the same.
There was a problem hiding this comment.
You are correct, that's not expected.

Closes #1299
Brief summary of the change made
Are there any other side effects of this change that we should be aware of?
Describe how you tested your changes?
Pull Request checklist
Please confirm you have completed any of the necessary steps below.