def post(self, request, *args, **kwargs):
        context = self.get_context_data()
        form = SendSuggestionForm(self.request.POST or None)
        if form and form.is_valid():
            recipients = RECIPIENTS_SUGGESTION
            subject = SUBJECT_SUGGESTION
            message = request.POST.get('text', '')
            send_simple_email(recipients, subject, message)

        return super(IndexView, self).render_to_response(context)
Beispiel #2
0
def send_email_action_task(recipients, subject, message):
    send_simple_email(recipients, subject, message)
Beispiel #3
0
def send_email_action_task(recipients, subject, message):
    send_simple_email(recipients, subject, message)