Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/formmail/web/formmail.py

Issue 5920587679531008: Issue 1946 - Include form-mail sender address in message content (Closed)
Patch Set: Issue 1946 - Use datetime.now().strftime() instead of strftime() Created April 17, 2015, 2:31 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sitescripts/formmail/template/eyeo.mail ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/formmail/web/formmail.py
===================================================================
--- a/sitescripts/formmail/web/formmail.py
+++ b/sitescripts/formmail/web/formmail.py
@@ -16,7 +16,7 @@
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
import re
-import time
+import datetime
from urlparse import parse_qsl
from sitescripts.utils import get_config, sendMail, setupStderr
from sitescripts.web import url_handler
@@ -51,6 +51,6 @@
if not re.match(r'^\w[\w.+!-]+@\w[\w.-]+\.[a-zA-Z]{2,6}$', params['email']):
return 'Invalid email address'
- params['strftime'] = time.strftime
+ params['time'] = datetime.datetime.now()
sendMail(get_config().get('formmail', 'template'), params)
return 'Message sent'
« no previous file with comments | « sitescripts/formmail/template/eyeo.mail ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld