Send email with o365 account

Hi all,

I’ve been trying to find out how to send an email with an Outlook 365 account.
Now i found some examples, but they all use the:

from email.mime.text import MIMETex
from email.mime.multipart import MIMEMultipart

It seems that this is not supported by Python anymore.
I’m getting this error message:
ModuleNotFoundError: No module named 'email.mime'; 'email' is not a package

Any help will be appreciated.

This happens because there is an email.py in your project which is being found instead of the email package in the standard library.

See also:

Thanks, Karl,

That solved my issue :slight_smile: