Skip to content

Commit

Permalink
Full functionality to read Gmail messages complete #2
Browse files Browse the repository at this point in the history
  • Loading branch information
nickknudsen committed Jan 23, 2020
1 parent f9a3611 commit 2a781eb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os.path
import base64
import email
import re
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
Expand All @@ -20,6 +21,15 @@ def GetMessage(service, msg_id):

to_email = [i['value'] for i in headers if i['name']=='To']

parsed_email = re.split('@', to_email)

if(parsed_email[1] == 'feedback.mndaily.com'):
pass
#lookup and Forward
elif(parsed_email[0] == 'feedback' and parsed_email[1] == 'mndaily.com'):
pass
#create a alias and forward to [email protected]

#print('To: %s' % to_email[0])

'''
Expand Down

0 comments on commit 2a781eb

Please sign in to comment.