Issue #3 resolved

Problem with Gmail's SMTP server

Jonas Galvez
created an issue

I'm having a bizarre issue when trying to use Gmail as a SMTP server. I have set MAIL_SERVER, MAIL_USERNAME, MAIL_PASSWORD AND MAIL_USE_TLS correctly, but I keep getting the following error:

{{{SMTP AUTH extension not supported by server.}}}

At first glance, the original code is missing explicit helo()/ehlo() calls, but adding them doesn't seem help either.

The strange thing is, with the exact same parameters, a Fabric task "try_sending_mail" using smtplib directly seems to work just fine.

Here's the code for try_sending_mail(): http://gist.github.com/627275

Can you try and reproduce that with a Gmail account of yours using Flask-Mail? I must be either missing something badly, or there might be a little bug hidden in Flask-Mail.

Comments (10)

  1. Jonas Galvez reporter

    Dan, I am aware of that, as I have repeatedly made clear. Do you actually have working test code using flask-mail to talk to Gmail's SMTP? If so, please share, so I can try and compare with mine and figure out what went wrong.

  2. Dan Jacob repo owner

    Sorry: a) just saw your latest reply and b) misunderstood your initial message.

    I'll write some code to connect to Gmail and let you know how it goes.

  3. Dan Jacob repo owner

    Got it working with no problems. Here are the settings I used:

    MAIL_SERVER = "smtp.gmail.com"
    MAIL_USE_TLS = True
    MAIL_USE_SSL = False
    MAIL_USERNAME = "danjac354"
    MAIL_PASSWORD = "******"
    

    Please let me know if this works for you.

  4. Kostas Jakeliunas

    (Late by a couple of years, but) I had a virutally identical problem (flask.ext.mail + gmail), simply had to enable TLS, so for what it's worth, I second Dan, all is well.

  5. Log in to comment