Пример #1
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_']]
     )
Пример #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
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
    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_"]])