schoginitoys commited on
Commit
8412836
1 Parent(s): 3629b3d
Files changed (2) hide show
  1. app.py +1 -15
  2. my_email.py +0 -58
app.py CHANGED
@@ -5,21 +5,7 @@ import requests
5
  import time
6
  import examples
7
 
8
- def send_email(msg, subject):
9
- email_address = "60pluscrazy@gmail.com"
10
- email_password = "wafn epqn vmtb ejht"
11
- # Recipient email and subject
12
- to_email = "schogini@gmail.com"
13
- subject = "ChatBot: " + subject #"Hello from Python"
14
-
15
- body = msg
16
-
17
- mailServer = smtplib.SMTP('smtp.gmail.com' , 587)
18
- mailServer.starttls()
19
- mailServer.login(email_address , email_password)
20
- mailServer.sendmail(email_address, to_email , body)
21
- #print(" \n Sent!")
22
- mailServer.quit()
23
 
24
 
25
  def post_it(q=''):
 
5
  import time
6
  import examples
7
 
8
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
 
11
  def post_it(q=''):
my_email.py DELETED
@@ -1,58 +0,0 @@
1
- # import smtplib
2
- # import smtplib
3
- # pip install secure-smtplib
4
- # from email.mime.text import MIMEText
5
- # from email.mime.multipart import MIMEMultipart
6
-
7
- # Your email credentials
8
- email_address = "60pluscrazy@gmail.com"
9
- email_password = "wafn epqn vmtb ejht"
10
-
11
- # Recipient email and subject
12
- to_email = "schogini@gmail.com"
13
- subject = "Hello from Python"
14
-
15
- # Create the email content
16
- # message = MIMEMultipart()
17
- # message["From"] = email_address
18
- # message["To"] = to_email
19
- # message["Subject"] = subject
20
-
21
- # # Email body
22
- body = "This is a test email sent from Python."
23
- # message.attach(MIMEText(body, "plain"))
24
-
25
- # # Connect to Gmail's SMTP server
26
- # server = smtplib.SMTP("smtp.gmail.com", 587)
27
- # server.starttls()
28
-
29
- # # Login to your email account
30
- # server.login(email_address, email_password)
31
-
32
- # # Send the email
33
- # server.sendmail(email_address, to_email, message.as_string())
34
-
35
- # # Disconnect from the server
36
- # server.quit()
37
-
38
-
39
- # from smtplib import SMTP
40
- # with SMTP("domain.org") as smtp:
41
- # smtp.noop()
42
-
43
- import smtplib
44
- # server = smtplib.SMTP("smtp.gmail.com", 587)
45
- # server.starttls()
46
-
47
- # exit()
48
-
49
- # gmailaddress = input("what is your gmail address? \n ")
50
- # gmailpassword = input("what is the password for that email address? \n ")
51
- # mailto = input("what email address do you want to send your message to? \n ")
52
- # msg = input("What is your message? \n ")
53
- mailServer = smtplib.SMTP('smtp.gmail.com' , 587)
54
- mailServer.starttls()
55
- mailServer.login(email_address , email_password)
56
- mailServer.sendmail(email_address, to_email , body)
57
- print(" \n Sent!")
58
- mailServer.quit()