Changeset 7221 for main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
- Timestamp:
- 27 Nov 2011, 06:50:43 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r7214 r7221 313 313 name = data['name'] 314 314 title = data['title'] 315 email = data['email'] 315 316 description = data['description'] 316 317 #password = data['password'] … … 326 327 return 327 328 try: 328 self.context.addUser(name, password, title=title, 329 self.context.addUser(name, password, title=title, email=email, 329 330 description=description, roles=roles) 330 331 except KeyError: … … 506 507 msg['From'] = '%s <%s>' % (fullname,email) 507 508 508 # These parameters should be part of the portal configuration. 509 msg['To'] = 'contact@waeup.org' 510 msg['Subject'] = 'WAeUP Contact' 511 #server = smtplib.SMTP('smtp_server') 512 # Also connection details (username, passwords, host, port, 513 # etc.) should be settable somewhere. 514 # server.login('user_name','secret_password') 515 server = smtplib.SMTP('localhost') 516 server.sendmail(email,'contact@waeup.org',msg.as_string()) 509 config = grok.getSite()['configuration'] 510 msg['To'] = config.email_admin 511 msg['Subject'] = config.email_subject 512 server = smtplib.SMTP(config.smtp_server) 513 if config.smtp_requires_login: 514 server.login(config.smtp_username,config.smtp_password) 515 server.sendmail(email,config.email_admin,msg.as_string()) 517 516 518 517 server.quit()
Note: See TracChangeset for help on using the changeset viewer.