Changeset 046026 in indico
- Timestamp:
- 02/08/10 17:19:55 (3 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, new-webex, prov-dual-interface, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
- Children:
- dab490, f3d0f4
- Parents:
- 06ec19
- git-author:
- Cesar Munoz Orena <cesar.munoz.orena@…> (01/21/10 14:06:05)
- git-committer:
- Pedro Ferreira <jose.pedro.ferreira@…> (02/08/10 17:19:55)
- Files:
-
- 16 edited
-
etc/indico.conf.sample (modified) (1 diff)
-
indico/MaKaC/common/Configuration.py (modified) (1 diff)
-
indico/MaKaC/common/fossilize.py (modified) (1 diff)
-
indico/MaKaC/common/info.py (modified) (2 diffs)
-
indico/MaKaC/common/pendingQueues.py (modified) (1 diff)
-
indico/MaKaC/conference.py (modified) (2 diffs)
-
indico/MaKaC/evaluation.py (modified) (1 diff)
-
indico/MaKaC/participant.py (modified) (3 diffs)
-
indico/MaKaC/registration.py (modified) (5 diffs)
-
indico/MaKaC/webinterface/common/abstractNotificator.py (modified) (2 diffs)
-
indico/MaKaC/webinterface/mail.py (modified) (5 diffs)
-
indico/MaKaC/webinterface/pages/admins.py (modified) (2 diffs)
-
indico/MaKaC/webinterface/rh/CFADisplay.py (modified) (3 diffs)
-
indico/MaKaC/webinterface/rh/admins.py (modified) (1 diff)
-
indico/MaKaC/webinterface/tpls/Admins.tpl (modified) (1 diff)
-
indico/MaKaC/webinterface/tpls/GeneralInfoModification.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
etc/indico.conf.sample
r040db3 r046026 103 103 104 104 PublicSupportEmail = "root@localhost" 105 106 # NoReplyEmail is the email address showed when we do not want the users to answer 107 # an automatically generated email. 108 109 NoReplyEmail = "noreply-root@localhost" 105 110 106 111 -
indico/MaKaC/common/Configuration.py
rc71c8b r046026 387 387 'SupportEmail' : 'root@localhost', 388 388 'PublicSupportEmail' : 'root@localhost', 389 'NoReplyEmail' : 'noreply-root@localhost', 389 390 'IndicoSearchServer' : '', 390 391 'IndicoSearchClass' : 'MaKaC.search.invenioSEA.InvenioSEA', -
indico/MaKaC/common/fossilize.py
r59ab92 r046026 18 18 def addFossil(klazz, fossils): 19 19 """ Declares fossils for a class 20 20 21 21 :param klazz: a class object 22 22 :type klass: class object -
indico/MaKaC/common/info.py
r6884f0 r046026 41 41 self._supportEmail = "" 42 42 self._publicSupportEmail = "" 43 self._noReplyEmail = "" 43 44 self._city = "" 44 45 self._country = "" … … 228 229 def setPublicSupportEmail( self, newEmail ): 229 230 self._publicSupportEmail = newEmail.strip() 231 232 def getNoReplyEmail( self, returnSupport=False ): 233 if not hasattr( self, "_noReplyEmail" ) or (self._noReplyEmail == "" and Config.getInstance().getNoReplyEmail() != ""): 234 self._noReplyEmail = Config.getInstance().getNoReplyEmail() 235 236 if self._noReplyEmail != "": 237 return self._noReplyEmail 238 elif returnSupport: 239 return self.getSupportEmail() 240 else: 241 return "" 242 243 return self._noReplyEmail 244 245 def setNoReplyEmail( self, newEmail ): 246 self._noReplyEmail = newEmail.strip() 247 230 248 231 249 def getCity( self ): -
indico/MaKaC/common/pendingQueues.py
r9033fd r046026 120 120 def getFromAddr(self): 121 121 # TODO: There will be on "from address" from a conference, but what if there are more different conferences 122 supEmail=self._psList[0].getConference().getSupportEmail( )122 supEmail=self._psList[0].getConference().getSupportEmail(returnNoReply=True) 123 123 if self._forceIndicoFromAddress or supEmail.strip()=="": 124 124 info = HelperMaKaCInfo.getMaKaCInfoInstance() -
indico/MaKaC/conference.py
r0d29a2 r046026 3140 3140 self.notifyModification() 3141 3141 3142 def getSupportEmail( self ): 3143 """Returns the support email address associated with the conference 3142 def getSupportEmail( self, returnNoReply=False ): 3143 """ 3144 Returns the support email address associated with the conference 3145 :param returnNoReply: Return no-reply address in case there's no support e-mail (default True) 3146 :type returnNoReply: bool 3147 3144 3148 """ 3145 3149 try: … … 3148 3152 except AttributeError, e: 3149 3153 self._supportEmail = "" 3150 return self._supportEmail 3154 if self._supportEmail.strip() == "" and returnNoReply: 3155 # In case there's no conference support e-mail, return the no-reply 3156 # address, and the 'global' support e-mail if there isn't one 3157 return HelperMaKaCInfo.getMaKaCInfoInstance().getNoReplyEmail(returnSupport=True) 3158 else: 3159 return self._supportEmail 3151 3160 3152 3161 def setSupportEmail( self, newSupportEmail ): -
indico/MaKaC/evaluation.py
r9033fd r046026 1464 1464 from MaKaC.common.timerExec import sendMail 1465 1465 sm = sendMail() 1466 sm.setFromAddr( HelperMaKaCInfo.getMaKaCInfoInstance().getSupportEmail() ) 1466 supportEmail = evaluation.getConference().getSupportEmail(returnNoReply=True) 1467 sm.setFromAddr(supportEmail) 1467 1468 for to in toList: 1468 1469 sm.addToAddr(to) -
indico/MaKaC/participant.py
r9033fd r046026 582 582 583 583 createURL = urlHandlers.UHUserCreation.getURL() 584 data["fromAddr"] = info.HelperMaKaCInfo.getMaKaCInfoInstance().get SupportEmail()584 data["fromAddr"] = info.HelperMaKaCInfo.getMaKaCInfoInstance().getNoReplyEmail(returnSupport=True) 585 585 toList = [] 586 586 toList.append(participant.getEmail()) … … 616 616 617 617 data = {} 618 data["fromAddr"] = info.HelperMaKaCInfo.getMaKaCInfoInstance().get SupportEmail()618 data["fromAddr"] = info.HelperMaKaCInfo.getMaKaCInfoInstance().getNoReplyEmail(returnSupport=True) 619 619 if len(self._dateNegotiation.getSolutionList()) == 0: 620 620 … … 1033 1033 if sendMail: 1034 1034 data = {} 1035 data["fromAddr"] = info.HelperMaKaCInfo.getMaKaCInfoInstance().get SupportEmail()1035 data["fromAddr"] = info.HelperMaKaCInfo.getMaKaCInfoInstance().getNoReplyEmail(returnSupport=True) 1036 1036 confTitle = self._participation.getConference().getTitle() 1037 1037 data["subject"] = _("Your application for attendance in %s declined")%confTitle -
indico/MaKaC/registration.py
r1ec0c1 r046026 628 628 629 629 def sendEmailNewRegistrant(self, regForm, rp): 630 fromAddr=regForm.getConference().getSupportEmail( )630 fromAddr=regForm.getConference().getSupportEmail(returnNoReply=True) 631 631 url = urlHandlers.UHConferenceDisplay.getURL(regForm.getConference()) 632 632 … … 639 639 paymentWarning = "." 640 640 641 if fromAddr.strip()=="":642 info = HelperMaKaCInfo.getMaKaCInfoInstance()643 fromAddr = "%s <%s>"%(info.getTitle(), info.getSupportEmail())644 641 subject= _("""New registrant in '%s': %s""")%(strip_ml_tags(regForm.getConference().getTitle()), rp.getFullName()) 645 642 body=_(""" … … 675 672 if not registrant.getConference().getModPay().isEnableSendEmailPaymentDetails(): 676 673 return 677 fromAddr=registrant.getConference().getSupportEmail( )674 fromAddr=registrant.getConference().getSupportEmail(returnNoReply=True) 678 675 date=registrant.getConference().getStartDate() 679 676 getTitle=strip_ml_tags(registrant.getConference().getTitle()) 680 677 idRegistrant=registrant.getIdPay() 681 678 detailPayment=registrant.getConference().getModPay().getPaymentDetails() 682 if fromAddr.strip()=="":683 info = HelperMaKaCInfo.getMaKaCInfoInstance()684 fromAddr = "%s <%s>"%(info.getTitle(), info.getSupportEmail())685 679 subject=_("""New registrant in '%s': %s - payment""")%(strip_ml_tags(registrant.getConference().getTitle()), registrant.getFullName()) 686 680 body= _(""" … … 739 733 740 734 def sendEmailNewRegistrantConfirmPay(self, regForm,registrant): 741 fromAddr=registrant.getConference().getSupportEmail( )735 fromAddr=registrant.getConference().getSupportEmail(returnNoReply=True) 742 736 date=registrant.getConference().getStartDate() 743 737 getTitle=strip_ml_tags(registrant.getConference().getTitle()) 744 738 idRegistrant=registrant.getIdPay() 745 739 746 if fromAddr.strip()=="":747 info = HelperMaKaCInfo.getMaKaCInfoInstance()748 fromAddr = "%s <%s>"%(info.getTitle(), info.getSupportEmail())749 740 subject= _("""New registrant in '%s': %s""")%(strip_ml_tags(registrant.getConference().getTitle()), registrant.getFullName()) 750 741 body= _(""" … … 803 794 804 795 def sendEmailModificationRegistrant(self, regForm, rp): 805 fromAddr=regForm.getConference().getSupportEmail() 806 if fromAddr.strip()=="": 807 info = HelperMaKaCInfo.getMaKaCInfoInstance() 808 fromAddr = "%s <%s>"%(info.getTitle(), info.getSupportEmail()) 796 fromAddr=regForm.getConference().getSupportEmail(returnNoReply=True) 809 797 subject= _("""Registration modified for '%s': %s""")%(strip_ml_tags(regForm.getConference().getTitle()), rp.getFullName()) 810 798 body= _(""" -
indico/MaKaC/webinterface/common/abstractNotificator.py
r1c9b696 r046026 28 28 from MaKaC.errors import MaKaCError 29 29 from MaKaC.i18n import _ 30 from MaKaC.common.info import HelperMaKaCInfo 30 31 31 32 class ConfTitleTplVar(TplVar): … … 236 237 237 238 def notify(self,abstract,tpl): 239 #if no from address is specified we should put the default one 240 if tpl.getFromAddr().strip() == "": 241 tpl.setFromAddr(tpl.getConference().getSupportEmail(returnNoReply=True)) 242 238 243 sm=GenericMailer.send(self.apply(abstract,tpl)) 239 244 -
indico/MaKaC/webinterface/mail.py
r420dc1 r046026 118 118 119 119 class Mailer: 120 121 def send( notification ):120 121 def send( notification, fromAddress="" ): 122 122 info = HelperMaKaCInfo.getMaKaCInfoInstance() 123 fromAddr = "%s <%s>"%(info.getTitle(), info.getSupportEmail()) 123 if fromAddress.strip() == "": 124 fromAddr = "%s <%s>"%(info.getTitle(), info.getSupportEmail()) 125 else: 126 fromAddr = notification.getFromAddr() 124 127 toAddr = str(notification.getDestination().getEmail()) 125 128 text = """%s … … 151 154 self._user.getId(), \ 152 155 self._user.getKey()) 153 maildata = { "fromAddr": "Indico Mailer<%s>"%HelperMaKaCInfo.getMaKaCInfoInstance().get SupportEmail(), "toList": [self._user.getEmail()], "subject": _("[%s] Confirmation request")%getSubjectIndicoTitle(), "body": text }156 maildata = { "fromAddr": "Indico Mailer<%s>"%HelperMaKaCInfo.getMaKaCInfoInstance().getNoReplyEmail(returnSupport=True), "toList": [self._user.getEmail()], "subject": _("[%s] Confirmation request")%getSubjectIndicoTitle(), "body": text } 154 157 GenericMailer.send(GenericNotification(maildata)) 155 158 … … 168 171 <%s> 169 172 """% (name,urlHandlers.UHUserDetails.getURL( self._user )) 170 maildata = { "fromAddr": "Indico Mailer<%s>" % minfo.get SupportEmail(), "toList": minfo.getAdminEmails(), "subject": _("[Indico] New account creation request"), "body": text }173 maildata = { "fromAddr": "Indico Mailer<%s>" % minfo.getNoReplyEmail(returnSupport=True), "toList": minfo.getAdminEmails(), "subject": _("[Indico] New account creation request"), "body": text } 171 174 GenericMailer.send(GenericNotification(maildata)) 172 175 … … 200 203 Thank you for using Indico. 201 204 """)%(self._user.getIdentityList()[0].getLogin()) 202 maildata = { "fromAddr": "Indico Mailer<%s>"%minfo.get SupportEmail(), "toList": [self._user.getEmail()], "subject": _("[%s] Registration accepted")%getSubjectIndicoTitle(), "body": text }205 maildata = { "fromAddr": "Indico Mailer<%s>"%minfo.getNoReplyEmail(returnSupport=True), "toList": [self._user.getEmail()], "subject": _("[%s] Registration accepted")%getSubjectIndicoTitle(), "body": text } 203 206 GenericMailer.send(GenericNotification(maildata)) 204 207 … … 227 230 text += _("Password:%s\n")%l[2] 228 231 text += "==================\n" 229 maildata = { "fromAddr": "Indico Mailer<%s>"%HelperMaKaCInfo.getMaKaCInfoInstance().get SupportEmail(), "toList": [self._user.getEmail()], "subject": _("[%s] Login Information")%getSubjectIndicoTitle(), "body": text }230 GenericMailer.send(GenericNotification(maildata)) 232 maildata = { "fromAddr": "Indico Mailer<%s>"%HelperMaKaCInfo.getMaKaCInfoInstance().getNoReplyEmail(returnSupport=True), "toList": [self._user.getEmail()], "subject": _("[%s] Login Information")%getSubjectIndicoTitle(), "body": text } 233 GenericMailer.send(GenericNotification(maildata)) -
indico/MaKaC/webinterface/pages/admins.py
rab21d77 r046026 164 164 vars["supportEmail"] = minfo.getSupportEmail() 165 165 vars["publicSupportEmail"] = minfo.getPublicSupportEmail() 166 vars["noReplyEmail"] = minfo.getNoReplyEmail() 166 167 vars["lang"] = minfo.getLang() 167 168 vars["address"] = "" … … 262 263 vars["publicSupportEmail"] = genInfo.getPublicSupportEmail() 263 264 vars["city"] = genInfo.getCity() 264 vars["country"] = genInfo.getCountry() 265 vars["country"] = genInfo.getCountry() 266 vars["noReplyEmail"] = genInfo.getNoReplyEmail() 265 267 try: 266 268 selected_tz = genInfo.getTimezone() -
indico/MaKaC/webinterface/rh/CFADisplay.py
r9033fd r046026 306 306 307 307 def getFromAddr(self): 308 if self._conf.getSupportEmail().strip()!="": 309 return self._conf.getSupportEmail() 310 else: 311 return HelperMaKaCInfo.getMaKaCInfoInstance().getSupportEmail() 312 308 return self._conf.getSupportEmail(returnNoReply=True) 309 313 310 def getCCList(self): 314 311 return self._abstract.getOwner().getSubmissionNotification().getCCList() … … 398 395 # the user to be logged in and therefore all the checking below is not 399 396 # necessary 397 400 398 if self._getUser() == None: 401 399 return … … 479 477 a.addTrack( track ) 480 478 a.setComments(self._abstractData.comments) 479 480 481 481 #The commit must be forced before sending the confirmation 482 482 DBMgr.getInstance().commit() 483 483 #Email confirmation about the submission 484 mail.Mailer.send( _AbstractSubmissionNotification( a ) )484 mail.Mailer.send( _AbstractSubmissionNotification( a ), self._conf.getSupportEmail(returnNoReply=True) ) 485 485 #Email confirmation about the submission to coordinators 486 486 if cfaMgr.getSubmissionNotification().hasDestination(): -
indico/MaKaC/webinterface/rh/admins.py
r8126f9 r046026 204 204 self._minfo.setSupportEmail( params["supportEmail"] ) 205 205 self._minfo.setPublicSupportEmail( params["publicSupportEmail"] ) 206 self._minfo.setNoReplyEmail( params["noReplyEmail"] ) 206 207 self._minfo.setCity( params["city"] ) 207 208 self._minfo.setCountry( params["country"] ) -
indico/MaKaC/webinterface/tpls/Admins.tpl
r9033fd r046026 41 41 </tr> 42 42 <tr> 43 <td nowrap class="dataCaptionTD"><span class="dataCaptionFormat"><%= _("No reply email")%><br/><%= _("(for automatic messages that don't need answer)")%></span></td> 44 <td bgcolor="white" width="100%%" valign="top" class="blacktext"><%= escape(noReplyEmail) %></td> 45 </tr> 46 <tr> 43 47 <td nowrap class="dataCaptionTD"><span class="dataCaptionFormat"> <%= _("Language")%></span></td> 44 48 <td bgcolor="white" width="100%%" valign="top" class="blacktext"><%= _(lang)%></td> -
indico/MaKaC/webinterface/tpls/GeneralInfoModification.tpl
r9033fd r046026 34 34 <td bgcolor="white" width="100%%"> 35 35 <input type="text" size="50" name="publicSupportEmail" value="%(publicSupportEmail)s"> 36 </td> 37 </tr> 38 <tr> 39 <td nowrap class="titleCellTD"><span class="titleCellFormat"><%= _("No reply email")%><br><%= _("(for automatic messages that don't need answer)")%></span></td> 40 <td bgcolor="white" width="100%%"> 41 <input type="text" size="50" name="noReplyEmail" value="%(noReplyEmail)s"> 36 42 </td> 37 43 </tr>
Note: See TracChangeset
for help on using the changeset viewer.
