コード例 #1
0
 def task(subject=None, message=None, admins=None, 
 user=None, user_agent=None, ip=None, attachments=None, url=None):
     if not user_agent:
         user_agent = os.environ.get('HTTP_USER_AGENT', 'Unknown User Agent')
     if not url:
         url = GetUrl()
     if not ip:
         ip = IPAddress()
     from backend.mail.base import EmailMessage
     if not admins:
         admins = ['*****@*****.**']
     for admin in admins:
         email_msg = EmailMessage(
             duplicate_check=False,
             subject=subject, 
             to=admin, 
             context={
                 'message': message,
                 'url': url,
                 'ip': ip,
                 'user_agent': user_agent,
                 'user': user
             }, 
             template="admin_report.html",
             attachments=attachments,
             mixpanel=False)
         email_msg.send()  
コード例 #2
0
ファイル: index.py プロジェクト: jaytoday/passtiche
 def share_email_sender(self):
     from backend.mail.base import EmailMessage
     email_msg = EmailMessage(subject="Here is your PassBook pass",
                              to=self.user_pass.from_email,
                              context=self.context,
                              template='pass/sender.html')
     email_msg.send()
コード例 #3
0
ファイル: index.py プロジェクト: jaytoday/passtiche
 def download_email(self, to_email):
     from backend.mail.base import EmailMessage
     email_msg = EmailMessage(subject="Here is your PassBook pass",
                              to=to_email,
                              context=self.context,
                              template='pass/download.html')
     email_msg.send()
コード例 #4
0
ファイル: index.py プロジェクト: jaytoday/passtiche
 def share_email_recipient(self):
     from backend.mail.base import EmailMessage
     email_msg = EmailMessage(subject="You have been sent a PassBook pass",
                              to=self.user_pass.to_email,
                              context=self.context,
                              template='pass/recipient.html',
                              sender=self.user_pass.owner_email)
     email_msg.send()
コード例 #5
0
def send_welcome_email(user, subject):

    from backend.mail.base import EmailMessage
    email_msg = EmailMessage(duplicate_check=False,
                             campaign='SIGNUP',
                             subject=subject,
                             to=user.email,
                             context={'user': user},
                             template="confirm.html")
    email_msg.send()
コード例 #6
0
ファイル: base.py プロジェクト: jamslevy/passtiche
def send_welcome_email(user, subject):

    from backend.mail.base import EmailMessage
    email_msg = EmailMessage(
        duplicate_check=False,
        campaign='SIGNUP',
        subject=subject, 
        to=user.email, 
        context={'user': user}, 
        template="confirm.html")
    email_msg.send()  
コード例 #7
0
ファイル: index.py プロジェクト: jaytoday/passtiche
def invite_email(email):

    from backend.mail.base import EmailMessage
    email_msg = EmailMessage(duplicate_check=False,
                             campaign='INVITE_REQUEST',
                             sender='*****@*****.**',
                             subject="Setting you up with a Passtiche account",
                             to=email,
                             context={'email': email},
                             template="invite_request.html")

    email_msg.send()
コード例 #8
0
ファイル: index.py プロジェクト: jamslevy/passtiche
def invite_email(email):

    from backend.mail.base import EmailMessage
    email_msg = EmailMessage(
        duplicate_check=False,
        campaign='INVITE_REQUEST',
        sender='*****@*****.**',
        subject="Setting you up with a Passtiche account", 
        to=email, 
        context={ 'email': email }, 
        template="invite_request.html")
        
    email_msg.send()    
コード例 #9
0
ファイル: admin.py プロジェクト: jamslevy/passtiche
    def invite_accept(self):
            email = self.get_argument('email')

            from backend.mail.base import EmailMessage
            email_msg = EmailMessage(
                duplicate_check=False,
                campaign='REQUEST_INVITE',
                subject="Join the %s Beta" % self._settings['title'], 
                to=email, 
                context={ 'email': email }, 
                template="beta.html")
                
            #self.get_or_create_user(user_keyname=email.lower().strip(), 
            #password='******')
            
            email_msg.send()            
コード例 #10
0
    def invite_accept(self):
        email = self.get_argument('email')

        from backend.mail.base import EmailMessage
        email_msg = EmailMessage(duplicate_check=False,
                                 campaign='REQUEST_INVITE',
                                 subject="Join the %s Beta" %
                                 self._settings['title'],
                                 to=email,
                                 context={'email': email},
                                 template="beta.html")

        #self.get_or_create_user(user_keyname=email.lower().strip(),
        #password='******')

        email_msg.send()
コード例 #11
0
 def create_subuser(self, email_address):
     if not email_address:
         return False
     sub_user = SubUser.all().filter('email', email_address).get()
     if sub_user:
         return False
     sub_user = SubUser(main_account=self, email=email_address)
     sub_user.status = 'invited'
     sub_user.put()
     from backend.mail.base import EmailMessage
     subject = "You've been invited to join %s on Hiptype"%self.email
     to = email_address
     email_msg = EmailMessage(
         duplicate_check=False,
         campaign='SUBACCOUNT',
         subject=subject, 
         to=to, 
         context={
             'main_account_email': self.email,
             'email': email_address
         }, 
         template="subaccount.html")
     email_msg.send()
     return True
コード例 #12
0
ファイル: index.py プロジェクト: jamslevy/passtiche
 def share_email_sender(self):
     from backend.mail.base import EmailMessage
     email_msg = EmailMessage(subject="Here is your PassBook pass", to=self.user_pass.from_email, 
         context=self.context, template='pass/sender.html')   
     email_msg.send()
コード例 #13
0
ファイル: index.py プロジェクト: jamslevy/passtiche
 def share_email_recipient(self):
     from backend.mail.base import EmailMessage
     email_msg = EmailMessage(subject="You have been sent a PassBook pass", to=self.user_pass.to_email, 
         context=self.context, template='pass/recipient.html', sender=self.user_pass.owner_email)
     email_msg.send()      
コード例 #14
0
ファイル: index.py プロジェクト: jamslevy/passtiche
 def download_email(self, to_email):
     from backend.mail.base import EmailMessage
     email_msg = EmailMessage(subject="Here is your PassBook pass", to=to_email, 
         context=self.context, template='pass/download.html')
     email_msg.send()