Skip to content

[12.x] Allow configuration of retry period for RoundRobin and Failover mail transports#55222

Merged
taylorotwell merged 4 commits into
laravel:12.xfrom
jnoordsij:configure-failover-mailer-retryperiod
Apr 1, 2025
Merged

[12.x] Allow configuration of retry period for RoundRobin and Failover mail transports#55222
taylorotwell merged 4 commits into
laravel:12.xfrom
jnoordsij:configure-failover-mailer-retryperiod

Conversation

@jnoordsij

Copy link
Copy Markdown
Contributor

The Symfony RoundRobinTransport has a retryPeriod argument in its constructor (see https://github.com/symfony/mailer/blob/f3871b182c44997cf039f3b462af4a48fb85f9d3/Transport/RoundRobinTransport.php#L38), that allows one to configure how long a failing transport instance should be considered as 'dead' before retrying. This MR aims to allow configuring this within Laravel when using this transport.

It also deduplicates logic shared between the Failover and RoundRobin transports, given they are mostly identical in terms of implementation. This includes ensuring their tests are both in tests/Mail, rather than tests/Integration/Mail. If the latter variant was preferred, let me know and I'll replace it with a change the other way around.

@taylorotwell taylorotwell merged commit e9f18fc into laravel:12.x Apr 1, 2025
@jnoordsij jnoordsij deleted the configure-failover-mailer-retryperiod branch April 1, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants