Skip to content

[Mailer] stream_socket_enable_crypto php warning about crypto type #31105

@plandolt

Description

@plandolt

Symfony version(s) affected:
4.3-dev

Description
When using the EsmtpTransport transport with tls encryption I receive a PHP warning:

PHP Warning:  stream_socket_enable_crypto(): When enabling encryption you must specify the crypto type in .../vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php on line 156

How to reproduce

$transport = (new EsmtpTransport('example.com', 587, 'tls'))
    ->setUsername('...')
    ->setPassword('...');

Possible Solution
Honestly I have no clue on how stream_socket_enable_crypto should work, sorry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions