#!/usr/bin/python
# -*- coding: UTF-8 -*-
import datetime
import MySQLdb
import os
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
#os.system('source /etc/profile')
import sys
import xlwt
import xlrd
import smtplib
from time import strftime, localtime
from datetime import timedelta, date
import calendar
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.header import Header
#sys.path.append('/usr/lib64/python2.6/site-packages/cx_Oracle.so')
# 打开数据库连接
mydb = MySQLdb.connect("10.18.141.52","dba","xxxxxxx","ys" )
mycursor = mydb.cursor()
mycursor.execute('SET CHARACTER SET utf8;')
mycursor.execute('SET NAMES utf8;')
mycursor.execute('SET character_set_connection=utf8;')
sql2 = " CALL ys.pr_get_increament_report_by_plat_class1();"
try:
mycursor.execute(sql2)
results2 = mycur
阿里云邮箱发html邮件
最新推荐文章于 2023-03-20 11:02:16 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)