Quantcast
Channel: Howtos & more …– LANbugs
Viewing all articles
Browse latest Browse all 144

Python: Einfache HTML Mail versenden per SMTP

$
0
0
#!/usr/bin/env python

from mailer import Mailer
from mailer import Message
 
message = Message(From="foobar@example.com", To="foobaz@example.com")
message.Subject = "Eine HTML Mail"
message.Html = """
   <p>Hi!<br>
   Blah blub<br>
   </p>"""
 
sender = Mailer('smtp.example.com')
sender.send(message)

 


Viewing all articles
Browse latest Browse all 144