In Python flask I am trying to set up the SMTP for emails in outlook

  • #1
rgtr
92
8
TL;DR Summary
In python flask I am trying to setup the smtp for emails in outlook and it is not working. It was working with google.
I am trying setting up flask email for outlook. I had it working with gmail I found this link https://superuser.com/questions/1521236/how-to-allow-less-secure-app-access-in-microsoft-email I tried

Python:
    MAIL_SERVER= 'smtp.office365.com'

    MAIL_PORT  = 587

    MAIL_USE_TLS = True

    MAIL_USE_SSL = False

    MAIL_USERNAME = os.environ['EMAIL_USERNAME']

    MAIL_PASSWORD = os.environ['EMAIL_PASSWORD']


    # and I tried


    MAIL_SERVER= 'outlook.office365.com'

    MAIL_PORT = 995

    MAIL_USE_TLS = True

    MAIL_USE_SSL = False

    MAIL_USERNAME = os.environ['EMAIL_USERNAME']

    MAIL_PASSWORD = os.environ['EMAIL_PASSWORD']

1654365677166.png
 

Answers and Replies

Suggested for: In Python flask I am trying to set up the SMTP for emails in outlook

Replies
13
Views
1K
  • Last Post
Replies
9
Views
874
Replies
2
Views
867
  • Last Post
Replies
24
Views
874
  • Last Post
Replies
1
Views
151
  • Last Post
Replies
10
Views
1K
Replies
0
Views
380
  • Last Post
Replies
13
Views
913
Replies
3
Views
535
  • Last Post
Replies
5
Views
675
Top