Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Mailer] Amazon SES mailer SMTP transport broken in 4.4 #34064

Copy link
Copy link
Closed
@rimas-kudelis

Description

@rimas-kudelis
Issue body actions

Symfony version(s) affected: 4.4

Description
With 4.3, I could send emails using Amazon SES SMTP service.
With 4.4, this is impossible out of the box.

How to reproduce

  1. Configure your project to use Amazon SES mailer. MAILER_DSN should start with ses+smtp:
MAILER_DSN=ses+smtp://$AWS_SES_ACCESS_KEY:$AWS_SES_SECRET_KEY@default?region=eu-west-1
  1. Try sending an email.
  2. Observe how the action fails with an error like this:
[error] Error thrown while handling message Symfony\Component\Mailer\Messenger\SendEmailMessage. Dispatching for retry #1 using 1000 ms delay. Error: "Connection could not be established with host "ssl://email-smtp.eu-west-1.amazonaws.com:587": stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number."

Possible Solution
I see two ways to fix this:

  1. (Super simple) change the port in https://github.com/symfony/amazon-mailer/blob/5aeef4385c6f3dddc4dd341702c293e0f9579fd7/Transport/SesSmtpTransport.php#L28 to 465
  2. fix (revert?) the changes introduced in [Mailer] Simplify the way TLS/SSL/STARTTLS work #33233. It seems like STARTTLS doesn't quite work, at least with SES.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.