fief-dev / fief

Users and authentication management SaaS
https://www.fief.dev
Other
486 stars 42 forks source link

fief.services.email.base.SendEmailError: STARTTLS extension not supported by server. #391

Closed cfredericksen closed 2 weeks ago

cfredericksen commented 2 weeks ago

Describe the bug

I want to send email to my local smtp server. Everything works great except it appears "ssl": "false" is ignored or something. I have other apps using my simple, plaintext, internal-only smtp server just fine.

            - name: EMAIL_PROVIDER
              value: "SMTP"
            - name: EMAIL_PROVIDER_PARAMS
              value: '{"host": "192.168.200.7", "username": "chad", "password": "(redacted}", "port": "2525", "ssl": "false"}'

Expected behavior

I see the the fief-worker pod connect to my SMTP pod but fief-worker throws an error. "fief.services.email.base.SendEmailError: STARTTLS extension not supported by server."

Configuration

Additional context

Love the project, works amazing with my custom app.

fief-bailiff[bot] commented 2 weeks ago

Hail, @cfredericksen 👋 Welcome to Fief's kingdom!

Our team will get back to you very soon to help.

In the meantime, take a minute to star our repository ⭐️

star-fief

Want to support us?

Subscribe to one of our paid plan to help us continue our work and receive exclusive information and benefits! Starts at $5/month 🪙

Subscribe

Farewell!
frankie567 commented 2 weeks ago

I think the issue comes from the ssl property: you set it to the string "false", which probably evaluates to a truthy value in the email provider logic. Try like this with a plain boolean:

            - name: EMAIL_PROVIDER
              value: "SMTP"
            - name: EMAIL_PROVIDER_PARAMS
              value: '{"host": "192.168.200.7", "username": "chad", "password": "(redacted}", "port": "2525", "ssl": false}'
cfredericksen commented 2 weeks ago

I think I stared at the computer for too long. That was it. Thank you.