Skip to content

Aliencn/Smail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

###Smail
Python send mail

###Installation
Python 3.4 or later

From pip

pip install Smail

###Use

from Smail import Smail  
a=Smail()  
a.set_server("smtp.exmail.qq.com",465,"[email protected]","password")  
a.set_subject('hello')  
a.set_content('world')  
a.add_to_addr('[email protected]')  

#Optional  
a.add_cc_addr('[email protected]')  
a.add_cc_addr('[email protected]')  
a.add_bcc_addr('[email protected]')  
a.add_bcc_addr('[email protected]')  
a.add_attachment(r'D:\Alien_System\Desktop\0.jpg')  
a.add_attachment(r'D:\Alien_System\Desktop\1.exe')  

#send mail now  
a.send()