Possible Duplicate:
How to send Email Attachments with python
i have do some work on sendEmail using Python i get this code
import smtplib
def SendAnEmail( usr, psw, fromaddr, toaddr):
# SMTP server
server=smtplib.SMTP('smtp.gmail.com:587')
server.starttls()
server.login(usr,psw)
# Send
msg="text message ....... "
server.sendmail(fromaddr, toaddr, msg)
server.quit()
if __name__ == '__main__':
# Fill info...
usr='example@sender.ex'
psw='password'
fromaddr= usr
toaddr='example@recevier.ex'
SendAnEmail( usr, psw, fromaddr, toaddr)
if i need add image (attachment an image) how do that ? anyone have idea ?