Signed-off-by: binren <zhangbr@elab-plus.com>
@@ -121,10 +121,10 @@ class EmailUtil(object):
fields={
"enclosure": ('file', f, 'application/octet-stream'),
"mailAddressee": receiver,
- "enclosure1": 'null',
+ "enclosure1": ('file', None, 'application/octet-stream'),
"mailContent": content,
"mailEnclosureName": file_name,
- "mailEnclosureName1": 'null',
+ "mailEnclosureName1": None,
"mailTitle": mail_title,
"mailType": "text/html",
"time": ""
@@ -143,11 +143,13 @@ class EmailUtil(object):
if __name__ == '__main__':
send_email = EmailUtil()
- result = send_email.send_mail_by_admin('移动案场订阅日报', MailContentText.text_1.format(1, 2, 3, 4, 5, 6, 7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30, 31, 32, 33, 34, 35, 36),
+ result = send_email.send_mail_by_admin('移动案场订阅日报',
+ '报表内容请查收',
'1285211525@qq.com',
- r'D:\elab-code\elab_mvp\resources\建业项目卡片信息合档-补id(1)(1).xlsx',
- '建业项目卡片信息合档-补id(1)(1).xlsx',
- r'D:\elab-code\elab_mvp\resources\tongce1.xlsx',
- 'tongce1.xlsx')
+ r'D:\elab\elab_mvp\resources\report_data\2020-04-14\移动案场订阅周报_ltt_集团_2020-03-12至2020-03-13.xls',
+ '移动案场订阅周报_ltt_集团_2020-03-12至2020-03-13.xls'
+ )
print(result)
+