def sendChangedRequestEmail(self, oldRequest): to = self.sender msgBuilder = MsgBuilder(settings.CHANGED_REQ_TEMPLATE) msgBuilder.findDiffs(self.request, oldRequest) self._send(msgBuilder.body, settings.CHANGED_REQ_SUBJECT, to)
def sendFixRequestEmail(self, sendToUser=False, sendToHead=False): to = self._findTo(sendToUser, sendToHead) cc = self.sender msgBuilder = MsgBuilder(settings.FIX_REQ_TEMPLATE) msgBuilder.processPlaceholders(self.request) self._send(msgBuilder.body, settings.FIX_REQ_SUBJECT, to, cc)
def sendFreshRequestUserEmail(self): to = self.request['user']['email'] msgBuilder = MsgBuilder(settings.USER_FRESH_TEMPLATE) msgBuilder.processPlaceholders(self.request) self._send(msgBuilder.body, settings.USER_FRESH_SUBJECT, to)
def sendFreshRequestHeadEmail(self): to = self.request['head_email'] msgBuilder = MsgBuilder(settings.HEAD_FRESH_TEMPLATE) msgBuilder.processPlaceholders(self.request) self._send(msgBuilder.body, settings.HEAD_FRESH_SUBJECT, to)
def sendFreshRequestAdminEmail(self): to = settings.RMI_CHEF_MAIL cc = self.sender msgBuilder = MsgBuilder(settings.ADMIN_FRESH_TEMPLATE) msgBuilder.processPlaceholders(self.request) self._send(msgBuilder.body, settings.ADMIN_FRESH_SUBJECT, to, cc)