コード例 #1
0
ファイル: emailReader.py プロジェクト: heapxor/code
def infoEmail(key):

    if emailCheck(key) == 0:
        print 'Email is not in the DB'
    else:
        data = cass.getEmailInfo(key)
        infoPrint(data)
コード例 #2
0
ファイル: emailReader.py プロジェクト: heapxor/code
def rawEmail(key):

    #is the email in DB?    
    if emailCheck(key) == 0:
        print 'Email is not in the DB'
        return 0
    else:    
        header = cass.getRawHeader(key)        
        #mime or not mime email
        mime = cass.getMimeInfo(key)
        
        body = {}
        if mime == 0:
            #get the raw body
            body = cass.getRawBody(key) 
        else:
            #get the raw MIME body
            body = cass.getMimeBody(key, mime)

        return header + body