Exemplo n.º 1
0
    def get_message(self, item):
        args = item.get_arguments()

        sender_email = args[0]
        recipient_email = args[1]
        temp_password = args[2]

        url_args = {
            'u': recipient_email,
            'p': temp_password,
        }

        login_url = urllib.basejoin(config.service_url, 'install.html' + '#' + urllib.urlencode(url_args))

        variables = {
            'sender_email': sender_email,
            'recipient_email': recipient_email,
            'temp_password': temp_password,
            'login_url': login_url,
            'service': config.service_name
        }

        subject = self.subject.format(sender=sender_email)

        html = templates.get_html_content(self.template, variables)
        text = templates.get_text_content(self.template, variables)

        return Message(subject, recipient_email, None, text, html)
Exemplo n.º 2
0
    def get_message(self, item):
        subject = self.subject.format(service=config.service_name)

        args = item.get_arguments()
        recipient_email = args[0]
        token = args[1]
        token_signature = args[2]

        url_args = {
            'user': recipient_email,
            'token': token,
            'token_signature': token_signature
        }

        variables = {
            'verification_link':
            urllib.basejoin(
                config.service_url, 'mitro-core/user/VerifyDevice' + '?' +
                urllib.urlencode(url_args)),
            'service':
            config.service_name
        }

        html = templates.get_html_content(self.template, variables)
        text = templates.get_text_content(self.template, variables)

        return Message(subject, recipient_email, None, text, html)
Exemplo n.º 3
0
    def get_message(self, item):
        args = item.get_arguments()

        sender_email = args[0]
        recipient_email = args[1]
        temp_password = args[2]

        url_args = {
            'u': recipient_email,
            'p': temp_password,
        }

        login_url = urllib.basejoin(
            config.service_url,
            'install.html' + '#' + urllib.urlencode(url_args))

        variables = {
            'sender_email': sender_email,
            'recipient_email': recipient_email,
            'temp_password': temp_password,
            'login_url': login_url,
            'service': config.service_name
        }

        subject = self.subject.format(sender=sender_email)

        html = templates.get_html_content(self.template, variables)
        text = templates.get_text_content(self.template, variables)

        return Message(subject, recipient_email, None, text, html)
Exemplo n.º 4
0
    def get_message(self, item):
        args = item.get_template_params()
        to = args['TO']

        variables = {'service': config.service_name}

        html = templates.get_html_content(self.template, variables)
        text = templates.get_text_content(self.template, variables)

        return Message(self.subject, to, None, text, html)
Exemplo n.º 5
0
    def get_message(self, item):
        args = item.get_template_params()
        to = args['TO']

        variables = {
            'service': config.service_name
        }

        html = templates.get_html_content(self.template, variables)
        text = templates.get_text_content(self.template, variables)

        return Message(self.subject, to, None, text, html)
Exemplo n.º 6
0
    def get_message(self, item):
        subject = self.subject.format(service=config.service_name)

        args = item.get_arguments()
        to = args[0]

        url_args = {
            'user': args[0],
            'code': args[1],
        }

        variables = {
            'verification_link': urllib.basejoin(config.service_url,
                                                 'mitro-core/user/VerifyAccount' + '?' + urllib.urlencode(url_args)),
            'service': config.service_name
        }

        html = templates.get_html_content(self.template, variables)
        text = templates.get_text_content(self.template, variables)

        return Message(subject, to, None, text, html)
Exemplo n.º 7
0
    def get_message(self, item):
        subject = self.subject.format(service=config.service_name)

        args = item.get_arguments()
        recipient_email = args[0]
        token = args[1]
        token_signature = args[2]

        url_args = {
            'user': recipient_email,
            'token': token,
            'token_signature': token_signature
        }

        variables = {
            'verification_link': urllib.basejoin(config.service_url,
                                                 'mitro-core/user/VerifyDevice' + '?' + urllib.urlencode(url_args)),
            'service': config.service_name
        }

        html = templates.get_html_content(self.template, variables)
        text = templates.get_text_content(self.template, variables)

        return Message(subject, recipient_email, None, text, html)
Exemplo n.º 8
0
    def get_message(self, item):
        subject = self.subject.format(service=config.service_name)

        args = item.get_arguments()
        to = args[0]

        url_args = {
            'user': args[0],
            'code': args[1],
        }

        variables = {
            'verification_link':
            urllib.basejoin(
                config.service_url, 'mitro-core/user/VerifyAccount' + '?' +
                urllib.urlencode(url_args)),
            'service':
            config.service_name
        }

        html = templates.get_html_content(self.template, variables)
        text = templates.get_text_content(self.template, variables)

        return Message(subject, to, None, text, html)