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

The "gmail" scheme is not supported. #42711

Discussion options

It's been one year I'm using the google-mailer locally.
I just bumped php from 7.4 to 8.0 and now I'm getting this message although I didn't touch a single config file...

The google-mailer is still installed (and in my vendor),
The env file is still

MAILER_DSN=gmail://myMail@gmail.com:myPassword@default

The config is still

framework:
    mailer:
        dsn: '%env(MAILER_DSN)%'

Stacktrace is

in vendor/symfony/mailer/Transport.php (line 156)
in vendor/symfony/mailer/Transport.php -> fromDsnObject (line 141)
in vendor/symfony/mailer/Transport.php -> parseDsn (line 93)
in vendor/symfony/mailer/Transport.php -> fromString (line 85)

When I look at the fromDsnObject

    public function fromDsnObject(Dsn $dsn): TransportInterface
    {
        foreach ($this->factories as $factory) {
            if ($factory->supports($dsn)) {
                return $factory->create($dsn);
            }
        }

        throw new UnsupportedSchemeException($dsn);
    }

There is no gmailFactory inside the factories property.

But if I call the static method getDefaultFactories instead, the gmail factory is correctly detected.

Any idea ?

You must be logged in to vote

It seems to work only if the google-mailer is in the require section, not the require-dev one.

Replies: 1 comment

Comment options

It seems to work only if the google-mailer is in the require section, not the require-dev one.

You must be logged in to vote
0 replies
Answer selected by VincentLanglet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.