Skip to content

[9.x] Symfony Mailer breaking changes #7629

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions mail.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,14 @@ To utilize AWS [temporary credentials](https://docs.aws.amazon.com/IAM/latest/Us
'token' => env('AWS_SESSION_TOKEN'),
],

If you would like to define [additional options](https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-sesv2-2019-09-27.html#sendemail) that Laravel should pass to the AWS SDK's `SendEmail` method when sending an email, you may define an `options` array within your `ses` configuration:
If you would like to define a ConfigurationSetName, you may opt to add a custom header to your Mailable.

'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'options' => [
'ConfigurationSetName' => 'MyConfigurationSet',
'EmailTags' => [
['Name' => 'foo', 'Value' => 'bar'],
],
],
],
public function build()
{
return $this->subject('Welcome to Laravel!')
->withSymfonyMessage(fn (\Symfony\Component\Mime\Email $email) => $email->getHeaders()->addTextHeader('X-SES-CONFIGURATION-SET', 'MySESConfigurationSet');
->view('email.template');
}

<a name="failover-configuration"></a>
### Failover Configuration
Expand Down
13 changes: 13 additions & 0 deletions upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,19 @@ SwiftMailer offered the ability to define a custom domain to include in generate

It is no longer possible to force a transport reconnection (for example when the mailer is running via a daemon process). Instead, Symfony Mailer will attempt to reconnect to the transport automatically and throw an exception if the reconnection fails.

#### AWS SES Options

It is no longer possible to define SES ConfigurationSet globally on `mail.php`. Instead, a new custom header must be added to your message as follows

public function build()
{
return $this->subject('Welcome to Laravel!')
->withSymfonyMessage(fn (\Symfony\Component\Mime\Email $email) => $email->getHeaders()->addTextHeader('X-SES-CONFIGURATION-SET', 'MySESConfigurationSet');
->view('email.template');
}

Email Tags for AWS SES are no longer supported by Symfony Mailer.

#### SMTP Stream Options

Defining stream options for the SMTP transport is no longer supported. Instead, you must define the relevant options directly within the configuration if they are supported. For example, to disable TLS peer verification:
Expand Down