You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble automatically sending emails via my Outlook email address using Python. My organisation has MFA enabled, and I do not believe I can turn it off. The code I use is below:
outlook.username = username
outlook.password = password
print("sending email")
outlook.send(
receivers=["[email protected]"], #NOTE: not email address I'm using, I'm using one that is legitimate
subject="An example",
text="Hi, this is an example."
)
print("email sent")
Expected behavior
I'm expecting to see the printed emails
sending email email sent
Email provider:
Email service: Outlook
Application to view the email (unsure)
Environment (please complete the following information if relevant):
OS: MacOSX
Python version 3.11.5
Red Mail version 0.6.0
The text was updated successfully, but these errors were encountered:
You may also need to config the smtp information. Better try like this:
fromredmailimportEmailSenderoutlook=EmailSender(host="smtp.office365.com", port=587, username=username, password=password)
outlook.send(
receivers=["[email protected]"], #NOTE: not email address I'm using, I'm using one that is legitimatesubject="An example",
text="Hi, this is an example."
)
Hi everyone,
I'm having trouble automatically sending emails via my Outlook email address using Python. My organisation has MFA enabled, and I do not believe I can turn it off. The code I use is below:
Expected behavior
I'm expecting to see the printed emails
sending email
email sent
Email provider:
Environment (please complete the following information if relevant):
The text was updated successfully, but these errors were encountered: