zoukankan      html  css  js  c++  java
  • 催收分案数据

    催收分案数据,邮箱开启smtp服务

    import pandas as pd
    import smtplib 
    from email.mime.multipart import MIMEMultipart 
    from email.mime.text import MIMEText 
    from email.mime.image import MIMEImage 
    from email.header import Header 
    from email.mime.multipart import MIMEMultipart
    from email.mime.text import MIMEText
    from email.mime.application import MIMEApplication
    import os
    from email import encoders 
    import time
    
    
    ttt=''' fagdfa 
    '''
    
    
    def sendmail(receiverlist,cclist,subject,content,filename):
    
        sender = 'zichanguanlizhongxin@carcredit.com.cn'
        smtpserver = 'smtp.exmail.qq.com'
        username ='zichanguanlizhongxin@carcredit.com.cn'
        password=''
    
        h = Header('资产管理中心', 'utf-8')
        h.append('<zichanguanlizhongxin@carcredit.com.cn>', 'ascii')
        
        msg = MIMEMultipart('mixed') 
        msg['Subject'] = Header(subject, 'utf-8')
        msg['From'] =h
        msg['To'] = ','.join(receiverlist)
        msg['Cc'] = ','.join(cclist)
     
        msg.attach(MIMEText(content, 'html', 'utf-8'))
    
    
        for i in range(len(filename)):
    
            attfile = filename[i]
            basename = os.path.basename(attfile)  
            fp = open(attfile, 'rb')  
            att = MIMEText(fp.read(), 'base64', 'utf-8')  
            att["Content-Type"] = 'application/octet-stream'  
            att.add_header('Content-Disposition', 'attachment',filename=('gbk', '', basename))  
        
            msg.attach(att)    
    
    
        smtp = smtplib.SMTP()
        # smtp.set_debuglevel(1)
    
        smtp.connect(host=smtpserver,port=25)
        
    
        smtp.login(username, password)
    
        smtp.sendmail(sender, receiverlist+cclist, msg.as_string())
        smtp.quit()
    
    
    sendmail(receiverlist=["zhangtianlong@carcredit.com.cn"],cclist=[],subject="ff",content=ttt,filename=[])
  • 相关阅读:
    [BZOJ1303][CQOI2009]中位数图
    [BZOJ1192][HNOI2006]鬼谷子的钱袋
    9.5题解
    9.3题解
    9.2题解
    9.1题解
    8.29题解
    8.28题解
    8.23<2>题解
    8.23<1>题解
  • 原文地址:https://www.cnblogs.com/nick477931661/p/11493990.html
Copyright © 2011-2022 走看看