コード例 #1
0
ファイル: views.py プロジェクト: robsonmobile/apostello
 def run_test(self, request, *args, **kwargs):
     """Send message to posted address."""
     from apostello.tasks import send_async_mail
     send_async_mail(
         'apostello test email', request.POST['body_'],
         [request.POST['to_']]
     )
コード例 #2
0
 def run_test(self, request, *args, **kwargs):
     """Send message to posted address."""
     from apostello.tasks import send_async_mail
     send_async_mail(
         'apostello test email', request.POST['body_'],
         [request.POST['to_']]
     )
コード例 #3
0
ファイル: signals.py プロジェクト: mrphishxxx/apostello
def email_admin_on_signup(request, user, **kwargs):
    """Email office on new user sign up."""
    body = (
        "New User Signed Up: {}\n\n"
        "Please go to the admin page to approve their account.\n"
        "If you do not approve their account (and they are not using a "
        "whitelisted domain), they will be unable to access apostello."
    )
    body = body.format(str(user))
    from site_config.models import SiteConfiguration
    to_ = SiteConfiguration.get_solo().office_email
    if to_:
        send_async_mail("[apostello] New User", body, [to_], )
コード例 #4
0
def email_admin_on_signup(request, user, **kwargs):
    """Email office on new user sign up."""
    body = ("New User Signed Up: {}\n\n"
            "Please go to the admin page to approve their account.\n"
            "If you do not approve their account (and they are not using a "
            "whitelisted domain), they will be unable to access apostello.")
    body = body.format(str(user))
    from site_config.models import SiteConfiguration
    to_ = SiteConfiguration.get_solo().office_email
    if to_:
        send_async_mail(
            "[apostello] New User",
            body,
            [to_],
        )
コード例 #5
0
ファイル: views.py プロジェクト: totbytot/apostello
    def run_test(self, data, *args, **kwargs):
        """Send message to posted address."""
        from apostello.tasks import send_async_mail

        send_async_mail("apostello test email", data["body_"], [data["to_"]])