-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Full functionality to read Gmail messages complete #2
- Loading branch information
1 parent
f9a3611
commit 2a781eb
Showing
1 changed file
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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]) | ||
|
||
''' | ||
|