-
Notifications
You must be signed in to change notification settings - Fork 0
/
SendEmail.py
30 lines (22 loc) · 872 Bytes
/
SendEmail.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# from importlib.resources import contents
# import pyttsx3
# import speech_recognition as sr
# import smtplib
# def sendEmail(to, content):
# server = smtplib.SMTP('smtp.gmail.com',587)
# server.ehlo()
# server.starttls()
# server.login('[email protected]', 'password')
# server.sendmail('[email protected]', to, content)
# server.close()
# BELOW WILL COME IN JARVIS_MAIN FOR CALLING AND EXECUTING
# elif 'email to harry' in query:
# try:
# speak("What should I say?")
# content = takeCommand()
# to = "[email protected]"
# sendEmail(to, content)
# speak("Email has been sent")
# except Exception as e:
# print(e)
# speak("Sorry bhai Mohit your email has not been sent, Please try again!")