• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python mail.GenericNotification类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中MaKaC.webinterface.mail.GenericNotification的典型用法代码示例。如果您正苦于以下问题:Python GenericNotification类的具体用法?Python GenericNotification怎么用?Python GenericNotification使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了GenericNotification类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self, psList):
     self._psList = psList
     self._participationsByConf = self._calculateParticipationsByConf()
     self._forceIndicoFromAddress = len(self._participationsByConf) > 1
     data = {}
     data["subject"] = "[Indico] User account creation required"
     data["toList"] = [self._psList[0].getEmail()]
     GenericNotification.__init__(self, data)
开发者ID:Ictp,项目名称:indico,代码行数:8,代码来源:pendingQueues.py


示例2: __init__

 def __init__(self, booking):
     GenericNotification.__init__(self)
     self._booking = booking
     self._bp = booking._bookingParams
     self._conference = booking.getConference()
     
     self._modifLink = str(booking.getModificationURL())
     
     self.setFromAddr("Indico Mailer<%s>"%HelperMaKaCInfo.getMaKaCInfoInstance().getSupportEmail())
     self.setContentType("text/html")
开发者ID:davidmorrison,项目名称:indico,代码行数:10,代码来源:mail.py


示例3: __init__

    def __init__(self, booking):
        GenericNotification.__init__(self)
        self._booking = booking
        self._bp = booking.getBookingParams()
        self._conference = booking.getConference()
        self._isLecture = self._conference.getType() == 'simple_event'

        self._modifLink = str(booking.getModificationURL())

        self.setFromAddr("Indico Mailer<%s>"%Config.getInstance().getSupportEmail())
        self.setContentType("text/html")
开发者ID:aninhalacerda,项目名称:indico,代码行数:11,代码来源:mail.py


示例4: __init__

    def __init__(self, booking):
        GenericNotification.__init__(self)

        self._booking = booking
        self._bp = booking._bookingParams
        self._conference = booking.getConference()

        self._modifLink = str(self._booking.getModificationURL())

        self.setFromAddr("Indico Mailer <%s>"%Config.getInstance().getSupportEmail())
        self.setToList(MailTools.getAdminEmailList())
        self.setContentType("text/html")
开发者ID:aninhalacerda,项目名称:indico,代码行数:12,代码来源:mail.py


示例5: __init__

 def __init__(self, user, judgement, contribution):
     GenericNotification.__init__(self)
     self.setFromAddr("Indico Mailer<%s>"%HelperMaKaCInfo.getMaKaCInfoInstance().getSupportEmail())
     self.setToList([user.getEmail()])
     
     if isinstance(judgement, EditorJudgement):
         self.setSubject("""[Indico] The layout of your contribution "%s" (id: %s) has been reviewed"""    
                         % (contribution.getTitle(), str(contribution.getId())))
         self.setBody("""Dear Indico user,
     
     The layout of your contribution "%s" (id: %s) has been reviewed.
     The judgement was: %s
     
     The comments of the editor were:
     "%s"
     
     Thank you for using our system.
     """ % ( contribution.getTitle(), str(contribution.getId()), judgement.getJudgement(),
             judgement.getComments())
     )
         
     elif isinstance(judgement, ReviewerJudgement):
         self.setSubject("""[Indico] The content of your contribution "%s" (id: %s) has been reviewed"""    
                         % (contribution.getTitle(), str(contribution.getId())))
         self.setBody("""Dear Indico user,
     
     The content of your contribution "%s" (id: %s) has been reviewed.
     The judgement was: %s
     
     The comments of the reviewer were:
     "%s"
     
     Thank you for using our system.
     """ % ( contribution.getTitle(), str(contribution.getId()), judgement.getJudgement(),
             judgement.getComments())
     )
         
     elif isinstance(judgement, RefereeJudgement):
         self.setSubject("""[Indico] Your contribution "%s" (id: %s) has been completely reviewed by the referee"""    
                         % (contribution.getTitle(), str(contribution.getId())))
         self.setBody("""Dear Indico user,
     
     Your contribution "%s" (id: %s) has been completely reviewed by the assigned referee.
     The judgement was: %s
     
     The comments of the referee were:
     "%s"
     
     Thank you for using our system.
     """ % ( contribution.getTitle(), str(contribution.getId()), judgement.getJudgement(),
             judgement.getComments())
     )
开发者ID:davidmorrison,项目名称:indico,代码行数:52,代码来源:contributionReviewing.py


示例6: __init__

    def __init__(self, user, role, conference):
        GenericNotification.__init__(self)
        self.setFromAddr("Indico Mailer <%s>" % Config.getInstance().getNoReplyEmail())
        self.setToList([user.getEmail()])
        self.setSubject("""[Indico] You have been removed as %s of the conference "%s" (id: %s)"""
                        % (role, conference.getTitle(), str(conference.getId())))
        self.setBody("""Dear Indico user,

        We are sorry to inform you that you have been removed as %s of the conference "%s" (id: %s).

        Thank you for using our system.
        """ % ( role, conference.getTitle(), str(conference.getId())
        ))
开发者ID:bubbas,项目名称:indico,代码行数:13,代码来源:paperReviewing.py


示例7: sendAndLog

    def sendAndLog(cls, notification, conference, module=None, user=None, skipQueue=False):
        if isinstance(notification, dict):
            # Wrap a raw dictionary in a notification class
            from MaKaC.webinterface.mail import GenericNotification

            notification = GenericNotification(notification)
        cls.send(notification, skipQueue=skipQueue)
        log_data = {
            u"content_type": to_unicode(notification.getContentType()),
            u"from": to_unicode(notification.getFromAddr()),
            u"to": map(to_unicode, notification.getToList()),
            u"cc": map(to_unicode, notification.getCCList()),
            u"bcc": map(to_unicode, notification.getBCCList()),
            u"subject": to_unicode(notification.getSubject()).strip(),
            u"body": to_unicode(notification.getBody()).strip(),
        }
        summary = u"Sent email: {}".format(log_data[u"subject"])
        conference.log(
            EventLogRealm.emails,
            EventLogKind.other,
            to_unicode(module or u"Unknown"),
            summary,
            user,
            type_=u"email",
            data=log_data,
        )
开发者ID:k3njiy,项目名称:indico,代码行数:26,代码来源:mail.py


示例8: __init__

    def __init__(self, user, role, conference):
        GenericNotification.__init__(self)
        self.setFromAddr("Indico Mailer <%s>" % Config.getInstance().getNoReplyEmail())
        self.setToList([user.getEmail()])
        self.setSubject("""You have been chosen as a %s for the conference "%s" """
                        % (role, conference.getTitle()))
        self.setBody("""Dear %s,

You have been chosen as a %s for the conference entitled "%s" in order to help with the paper reviewing process. Please find the Paper Reviewing utilities here:

%s

Kind regards,
Indico on behalf of "%s"
""" % ( user.getStraightFullName(), role, conference.getTitle(), urlHandlers.UHPaperReviewingDisplay.getURL(conference), conference.getTitle()))
开发者ID:Ictp,项目名称:indico,代码行数:15,代码来源:paperReviewing.py


示例9: __init__

    def __init__(self, user, role, contribution):
        GenericNotification.__init__(self)
        conference = contribution.event_new.as_legacy
        self.setFromAddr("Indico <%s>" % Config.getInstance().getNoReplyEmail())
        self.setToList([user.email])
        self.setSubject("""You are no longer a %s of a paper for "%s" """ % (role, conference.getTitle()))
        self.setBody("""Dear %s,

Please, be aware that you are no longer a %s of the paper entitled "%s" (id: %s) for the conference "%s":

%s

Kind regards,
Indico on behalf of "%s"
""" % (  user.full_name, role, contribution.title, str(contribution.friendly_id), conference.getTitle(), str(urlHandlers.UHConferenceDisplay.getURL(conference)), conference.getTitle()))
开发者ID:fph,项目名称:indico,代码行数:15,代码来源:contributionReviewing.py


示例10: __init__

    def __init__(self, task):
        GenericNotification.__init__(self)
        self.setFromAddr("Indico <%s>" % Config.getInstance().getNoReplyEmail())
        self.setToList([task.avatar.getEmail()])
        self.setSubject("""
The offline version of the event "%s" is ready to be downloaded
""" % (task.conference.getTitle()))
        self.setBody("""
Dear %s,

The offline version for the event "%s" was successfully generated and it is ready to be downloaded.

Download link: %s

Best Regards,
--
Indico""" % (task.avatar.getStraightFullName(), task.conference.getTitle(), task.getDownloadLink()))
开发者ID:Ictp,项目名称:indico,代码行数:17,代码来源:offlineEventGenerator.py


示例11: __init__

    def __init__(self, maxDate, previousTotal, newTotal, error = None, attainedDate = None):
        GenericNotification.__init__(self)
        self.setFromAddr("Indico Mailer <%s>" % Config.getInstance().getSupportEmail())
        self.setContentType("text/html")
        self.setToList(MailTools.getAdminEmailList('Vidyo'))
        serverTimezone = info.HelperMaKaCInfo.getMaKaCInfoInstance().getTimezone()

        if error:
            self.setSubject("""[Vidyo] Old room cleaning failed: %s rooms deleted"""
                        % str(previousTotal - newTotal))
            self.setBody("""Dear Vidyo Manager,<br />
<br />
A cleanup of old Vidyo rooms in <a href="%s">%s</a> encountered the following error:%s<br />
"All rooms before %s (%s, server timezone) should have been deleted but only the date %s was reached.<br />
There were %s rooms before the operation and there are %s rooms left now.<br />
""" % (MailTools.getServerName(),
       MailTools.getServerName(),
       escape(str(error)),
       formatDateTime(getAdjustedDate(maxDate, tz=serverTimezone)),
       serverTimezone,
       formatDateTime(getAdjustedDate(attainedDate, tz=serverTimezone)),
       str(previousTotal),
       str(newTotal)))
        else:
            self.setSubject("""[Vidyo] Old room cleaning successful: %s rooms deleted"""
                        % str(previousTotal - newTotal))
            self.setBody("""Dear Vidyo Manager,<br />
<br />
A cleanup was successfully executed for old Vidyo rooms in <a href="%s">%s</a>.<br />
All rooms attached to events finishing before %s (%s, server timezone) were deleted in the Vidyo server.<br />
There were %s rooms before the operation and there are %s  rooms left now.<br />
""" % (MailTools.getServerName(),
       MailTools.getServerName(),
       formatDateTime(getAdjustedDate(maxDate, tz=serverTimezone)),
       serverTimezone,
       str(previousTotal),
       str(newTotal)))
开发者ID:VishrutMehta,项目名称:indico,代码行数:37,代码来源:mail.py


示例12: sendAndLog

 def sendAndLog(cls, notification, conference, module=None, user=None, skipQueue=False):
     from indico.modules.events.logs import EventLogRealm, EventLogKind
     if isinstance(notification, dict):
         # Wrap a raw dictionary in a notification class
         from MaKaC.webinterface.mail import GenericNotification
         notification = GenericNotification(notification)
     cls.send(notification, skipQueue=skipQueue)
     log_data = {
         u'content_type': to_unicode(notification.getContentType()),
         u'from': to_unicode(notification.getFromAddr()),
         u'to': map(to_unicode, notification.getToList()),
         u'cc': map(to_unicode, notification.getCCList()),
         u'bcc': map(to_unicode, notification.getBCCList()),
         u'subject': to_unicode(notification.getSubject()).strip(),
         u'body': to_unicode(notification.getBody()).strip()
     }
     summary = u'Sent email: {}'.format(log_data[u'subject'])
     conference.log(EventLogRealm.emails, EventLogKind.other, to_unicode(module or u'Unknown'), summary, user,
                    type_=u'email', data=log_data)
开发者ID:MichelCordeiro,项目名称:indico,代码行数:19,代码来源:mail.py


示例13: __init__

 def __init__(self, room, userList):
     GenericNotification.__init__(self)
     self.setFromAddr("Indico Mailer <%s>"%Config.getInstance().getSupportEmail())
     self.setToList(userList)
开发者ID:Ictp,项目名称:indico,代码行数:4,代码来源:components.py


示例14: __init__

    def __init__(self, sendToList, fromEmail, fromName ="Indico Mailer"):
        GenericNotification.__init__(self)

        self.setContentType("text/html")
        self.setFromAddr("%s<%s>"%(fromName, fromEmail))
        self.setToList(sendToList)
开发者ID:arturodr,项目名称:indico,代码行数:6,代码来源:mail.py



注:本文中的MaKaC.webinterface.mail.GenericNotification类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python base.WPDecorated类代码示例发布时间:2022-05-24
下一篇:
Python mail.GenericMailer类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap