示例#1
0
        def sendCommentNotification(data, ctx, title):
            def getEmailText():
                emailPage = CommentNotificationEmail(data,title)
                emailPage.remember(icrux.ISkin(ctx), icrux.ISkin)
                return emailPage.renderSynchronously()

            fromAddress = self.avatar.realm.config['mailService']['fromEmail']
            toAddress = [self.avatar.realm.config['mailService']['fromEmail']]
            htmlemail = getEmailText()
            msg = mailutil.createhtmlmail(fromAddress, toAddress, 'Comment Posted by %s'%data.authorName, htmlemail)
            return self.avatar.realm.mailService.sendMessage(toAddress, fromAddress, msg)
示例#2
0
        def sendConfirmOrderEmail(data, ctx):
            salesOrder = data['sales_order']

            def getEmailText():
                emailPage = ConfirmOrderEmail(salesOrder)
                emailPage.remember(icrux.ISkin(ctx), icrux.ISkin)
                return emailPage.renderSynchronously()

            fromAddress = self.avatar.realm.config['mailService']['fromEmail']
            toAddress = [salesOrder.customer_email,self.avatar.realm.config['mailService']['fromEmail']]
            htmlemail = getEmailText()
            msg = mailutil.createhtmlmail(fromAddress, toAddress, 'David Ward Order Confirmation', htmlemail)
            return self.avatar.realm.mailService.sendMessage(toAddress, fromAddress, msg)
示例#3
0
        def sendEmail(emailHTML):

            fromAddress = self.app.config['mailService']['fromEmail']
            toAddress = [salesOrder.customer_email]
            msg = mailutil.createhtmlmail(fromAddress, toAddress, 'Order Processed', emailHTML)
            return MailService(self.app.config).sendMessage(toAddress, fromAddress, msg)