Changeset 7403 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 20 Dec 2011, 09:26:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7386 r7403 385 385 @grok.action('Send message now') 386 386 def send(self, *args, **data): 387 fullname = self.request.principal.title388 387 try: 389 email _from= self.request.principal.email388 email = self.request.principal.email 390 389 except AttributeError: 391 email_from = self.config.email_admin 392 username = self.request.principal.id 393 usertype = self.request.principal.user_type.title() 394 body = data['body'] 395 #subject = u'Mail from SIRP' 396 subject = data['subject'] 397 email_to = self.context.email 390 email = self.config.email_admin 391 usertype = getattr(self.request.principal, 392 'user_type', 'system').title() 398 393 sirp_utils = getUtility(ISIRPUtils) 399 success = sirp_utils.sendMail(fullname,username,usertype,self.config.name, 400 body,email_from,email_to,subject) 394 success = sirp_utils.sendMail( 395 self.request.principal.title,email, 396 self.context.display_fullname,self.context.email, 397 self.request.principal.id,usertype, 398 self.config.name, 399 data['body'],data['subject']) 401 400 if success: 402 401 self.flash('Your message has been sent.')
Note: See TracChangeset for help on using the changeset viewer.