The given solution to problem 08 (send an email) is to use smtplib to authenticate to Office 365. Internally this uses SMTP AUTH to authorize the client to send the email.
Alas, Office 365 and other big mail service providers like Google Mail have disabled SMTP AUTH. Other more complicated solutions are necessary, like building an app in Google Cloud or installing your own SMTP server locally