On Wed, Nov 18, 2009 at 6:30 PM, Nick Stinemates <n...@stinemates.org>wrote:
> On Wed, Nov 18, 2009 at 03:27:11PM -0400, Victor Subervi wrote: > > Hi; > > I need a good mailer that will enable me to mail email from web forms. > > smtplib > > > Suggestions? > > silly example.. > > #!/usr/bin/env python > import smtplib > > session = smtplib.SMTP("localhost") > username = "abc" > password = "def" > session.login(username, password) # only if it requires auth > > subject = "Hello, " > > header = "Subject: %s \r\nContent-type: text/html; > charset=utf-8\r\n\r\n" > > message = "world!" > > email_from = "vic...@is.awesome" > email_to = ["em...@myhost.com"] > > session.sendmail(email_from, email_to, header+messages) > > HTH, > Helps a lot! Thanks! V
-- http://mail.python.org/mailman/listinfo/python-list