Changeset 7402 for main/waeup.sirp/trunk/src/waeup/sirp/browser
- Timestamp:
- 20 Dec 2011, 09:18:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r7358 r7402 219 219 fullname = self.request.principal.title 220 220 try: 221 email _from= self.request.principal.email221 email = self.request.principal.email 222 222 except AttributeError: 223 email _from= self.config.email_admin223 email = self.config.email_admin 224 224 username = self.request.principal.id 225 225 usertype = getattr(self.request.principal, 226 226 'user_type', 'system').title() 227 body = data['body']228 email_to = self.config.email_admin229 subject = self.config.email_subject230 227 sirp_utils = getUtility(ISIRPUtils) 231 success = sirp_utils.sendMail(fullname,username,usertype, 232 self.config.name,body,email_from,email_to,subject) 228 success = sirp_utils.sendMail( 229 fullname,email, 230 self.config.name_admin,self.config.email_admin, 231 username,usertype,self.config.name, 232 data['body'],self.config.email_subject) 233 233 if success: 234 234 self.flash('Your message has been sent.') … … 246 246 @grok.action('Send now') 247 247 def send(self, *args, **data): 248 email_from = data['email_from']249 fullname = data['fullname']250 body = data['body']251 username = u'None'252 email_to = self.config.email_admin253 subject = self.config.email_subject254 usertype = u'Anonymous'255 248 sirp_utils = getUtility(ISIRPUtils) 256 success = sirp_utils.sendMail(fullname,username,usertype, 257 self.config.name,body,email_from,email_to,subject) 249 success = sirp_utils.sendMail( 250 data['fullname'],data['email_from'], 251 self.config.name_admin,self.config.email_admin, 252 u'None',u'Anonymous',self.config.name, 253 data['body'],self.config.email_subject) 258 254 if success: 259 255 self.flash('Your message has been sent.') … … 467 463 @grok.action('Send message now') 468 464 def send(self, *args, **data): 469 fullname = self.request.principal.title470 465 try: 471 email _from= self.request.principal.email466 email = self.request.principal.email 472 467 except AttributeError: 473 email_from = self.config.email_admin 474 username = self.request.principal.id 468 email = self.config.email_admin 475 469 usertype = getattr(self.request.principal, 476 470 'user_type', 'system').title() 477 body = data['body']478 email_to = self.context.email479 subject = self.config.email_subject480 471 sirp_utils = getUtility(ISIRPUtils) 481 success = sirp_utils.sendMail(fullname,username,usertype, 482 self.config.name,body,email_from,email_to,subject) 472 success = sirp_utils.sendMail( 473 self.request.principal.title,email, 474 self.context.title,self.context.email, 475 self.request.principal.id,usertype,self.config.name, 476 data['body'],self.config.email_subject) 483 477 if success: 484 478 self.flash('Your message has been sent.')
Note: See TracChangeset for help on using the changeset viewer.