Skip to content

Instantly share code, notes, and snippets.

@akosijose
Created June 17, 2022 04:35
Show Gist options
  • Save akosijose/b6ca5d584535764286183c9dcd4dcca0 to your computer and use it in GitHub Desktop.
Save akosijose/b6ca5d584535764286183c9dcd4dcca0 to your computer and use it in GitHub Desktop.
python using smtplib outlook
# final sender mail
import smtplib
def send_email(subject, body):
server = smtplib.SMTP(host='smtp-mail.outlook.com', port=587)
server.ehlo()
server.starttls()
server.login('[email protected]', 'Sm@rtd00rb3ll@345*')
message = f'Subject: {subject}\n\n{body}'
server.sendmail('[email protected]', '[email protected]', message)
server.quit()
send_email("haha", "hakdog")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment