Changeset 16551 for main/waeup.kofa/trunk/src/waeup/kofa/utils
- Timestamp:
- 14 Jul 2021, 11:39:09 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
r16431 r16551 359 359 subject, body, config) 360 360 361 def informNewStudent(self, user, pw, login_url, rpw_url): 362 """Inform student that a new student account has been created. 363 """ 364 subject = 'Your new Kofa student account' 365 text = _(u"""Dear ${a}, 366 367 Your student record of the Student Registration and Information Portal of 368 ${b} has been created for you. 369 370 Your user name: ${c} 371 Your password: ${d} 372 Login: ${e} 373 374 Or request a new secure password here: ${f} 375 376 Regards 377 """) 378 config = grok.getSite()['configuration'] 379 from_name = config.name_admin 380 from_addr = config.email_admin 381 rcpt_name = user.title 382 rcpt_addr = user.email 383 384 text = _(text, mapping={ 385 'a': rcpt_name, 386 'b': config.name, 387 'c': user.name, 388 'd': pw, 389 'e': login_url, 390 'f': rpw_url 391 }) 392 body = translate(text, 'waeup.kofa', 393 target_language=self.PORTAL_LANGUAGE) 394 return send_mail( 395 from_name, from_addr, rcpt_name, rcpt_addr, 396 subject, body, config) 397 398 361 399 def inviteReferee(self, referee, applicant, url_info=None): 362 400 """Send invitation email to referee.
Note: See TracChangeset for help on using the changeset viewer.