Saturday, March 7, 2015

Python Send Mail HTML

import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEImage import MIMEImage
from email.MIMEText import MIMEText
# Specifying the from and to addresses
fromaddr = ''
toaddrs  = ''
# Gmail Login
username = ''
password = 'password'
# Sending the mail
msg2= MIMEMultipart('alternative')
msg2.add_header('Subject', 'INI DATA BARU')
msg2.attach(MIMEText('some code'))
msg2.attach(MIMEText('<html><body><a href="">ZIPRUZ MAIL</a></body></html>', 'html'))
server = smtplib.SMTP('')
server.sendmail(fromaddr, toaddrs.split(","), msg2.as_string())

1 comment:

  1. High maintenance costs and lack of coaching are expected to hinder the markets growth. The rising reputation of Fishnet Stockings IoT within the manufacturing sector is the major factor driving the markets growth. The general machinery and transport machinery segments are expected to develop, thus positively contributing to the market revenue within the forthcoming years.