python stmplib send mail
来源:互联网 发布:中教数据库怎么样 编辑:程序博客网 时间:2024/05/24 06:15
class SendMail: def __init__(self,smtpadd,fromadd,toadd): self.Smtpadd = smtpadd self.Fromadd = fromadd self.Toadd = toadd def Login_Smtp(self,password): self.smtp = smtplib.SMTP() self.smtp.connect(self.Smtpadd,25) self.smtp.login(self.Fromadd,password) def Send_msg(self,subject,body): body = base64.b64encode(body) msg = 'From:%s\nTo:%s\nSubject:%s\nContent-Type:text/html\nContent-Transfer-Encoding:base64\n\n%s'%( self.Fromadd,self.Toadd,subject,body) self.smtp.sendmail(self.Fromadd,self.Toadd,msg) def Smtp_Logout(self): self.smtp.quit()
0 0
- python stmplib send mail
- python smtp send mail
- python send mail
- send mail by SMTP server (Python)
- send Mail
- Send mail
- Send mail
- SEND MAIL
- send mail
- send mail
- send mail
- SEND MAIL
- Use My Python,Send Your Mail(十来行代码)
- Java send mail
- 發郵件 send mail task
- Send Mail in SSIS
- 3.12 Send Mail任务
- PHP send mail
- 中小企业HR发问,人才都去哪儿了?
- hdu 1671 Phone List(数据结构:trie)
- 执行main函数之前要做的工作
- JS验证正则表达式(大全)
- 在 PowerShell 中使用 SQL Server
- python stmplib send mail
- mysql上排名sql的写法,类似oracle的rank和dense
- HDU 2586 - How far away ? (LCA)
- 宏定义与函数定义的小问题
- dom4j 创建 并 写入 xml文件
- object-c编程tips-KVO,KVC浅析
- openstack windows下远程debug调试(pycharm)
- 常用的事件晌应函数
- 简单记录,设置一体化状态栏背景颜色的方法