Message Generation : Email : Network PYTHON TUTORIALS


PYTHON TUTORIALS » Network » Email »

 

Message Generation


from email.MIMEText import MIMEText
message = """Hello,
-- Anonymous"""

msg = MIMEText(message)
msg['To'] 'recipient@example.com'
msg['From'] 'Test Sender <sender@example.com>'
msg['Subject'] 'Test Message'

print msg.as_string()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Network
» Email