Пример #1
0
        def added(_):
            # Send a mail to us so we know when people register
            maildata = """Fullname: %(fullname)s
Company: %(company)s
Email: %(email)s
Phone: %(phone)s
Address: %(address0)s
         %(address1)s
         %(address2)s
         %(address3)s
Country: %(country)s\n""" % data

            web.sendMail(
                "Registrations <*****@*****.**>", ["*****@*****.**"],
                "New Vulani Portal Registration - %s" %
                data['email'].encode('ascii', 'replace'),
                maildata.encode('ascii', 'replace'))

            maildata2 = """Thank you for registering with the Vulani Portal.

Vulani Portal allows you to place orders for Vulani products, as well as manage your existing products from one central location.

Please note your username is the email address you have registered with: %s

To confirm your registration please click the following link:
   http://reg.portal.vulani.net/Confirm/%s/
   
If you did not request this account, please delete this email.\n\n""" % (
                data['email'].encode('ascii', 'replace'), confhash)

            web.sendMail("Vulani <*****@*****.**>",
                         [data['email'].encode('ascii', 'replace')],
                         "Vulani Portal account confirmation", maildata2)

            return url.root.child('RegistrationComplete')
Пример #2
0
        def sendMail(row, order):
            orderText = """Vulani order #%s completed by %s <%s> for %s""" % (
                order[0] + 40215, row[3], row[4], order[3])

            web.sendMail("%s <%s>" % (row[3], row[4]), ["*****@*****.**"],
                         "[#%s] Completed Vulani Order" % (order[0] + 40215),
                         orderText)
            return returnRoot(None)
Пример #3
0
        def gotUser(user):
            name = user[3]
            email = user[4]

            subject = data['subject'].encode('ascii', 'replace')
            text = data['detail'].encode('ascii', 'replace')

            web.sendMail("%s <%s>" % (name, email), ["*****@*****.**"],
                         "[Vulani Support] %s" % subject, text)
            return url.root.child('Dashboard')
Пример #4
0
    def confirmUser(self, result, ctx):
        if not result:
            return ctx.tag[
                "Your confirmation string is not valid. Please email [email protected] for assistance"]

        web.sendMail(
            "Registrations <*****@*****.**>", ["*****@*****.**"],
            "Vulani portal confirmation - %s" % result[4],
            """%s confirmed their Vulani Portal registration successfully""" %
            result[5])

        return self.enamel.storage.confirmUser(result[0]).addBoth(
            self.renderConfirmed, ctx)
Пример #5
0
            def sendMail(row, order):
                orderText = """Vulani order #%s
   End user name : %s
   Hostname      : %s
   Support SLA   : %s
   Requested by  : %s at company %s\n
   Contact Number: %s
   Email address : %s """ % (40215 + order[0], name, host, support, row[3],
                             row[5], row[10], row[4])

                web.sendMail("%s <%s>" % (row[3], row[4]),
                             ["*****@*****.**"],
                             "[#%s] New Vulani Order" % (40215 + order[0]),
                             orderText)

                return url.root.child('Orders').child('Checkout').child(
                    order[0])