by MobileDigit · 19y ago · 0 comments
What are the two lines of code to produce this?
[(define-input feedback) (mail '("foo@bar") feedback)]Thank you for your input.
The code for the thank-you page could be as simple as:
import smtplib
smtplib.SMTP('127.0.0.1').sendmail('website@example.com', ['you@example.com'], "From: website@example.com\r\nTo: you@example.com\r\n\r\nMessage follows: %s" % (web.input.get('feedback', 'NOTHING'),))
Not sure it that will work without a .quit(), but then you'd have at least 4 lines. Well, that's what local libraries are for. :)