Exemplo n.º 1
0
def send_virus(request):
    status, error = sendmail_fromfile("*****@*****.**", request.user.username,
                                      os.path.join(settings.MODOBOA_DIR,
                                                   "tmp/virus.msg"))
    if status:
        return ajax_simple_response(dict(status="ok", respmsg=_("Message sent")))
    return ajax_simple_response(dict(status="ko", respmsg=error))
Exemplo n.º 2
0
def send_virus(request):
    status, error = sendmail_fromfile(
        "*****@*****.**", request.user.username,
        os.path.join(settings.MODOBOA_DIR, "tmp/virus.msg"))
    if status:
        return render_to_json_response(_("Message sent"))
    return render_to_json_response(error, status=500)
Exemplo n.º 3
0
def send_virus(request):
    status, error = sendmail_fromfile(
        "*****@*****.**", request.user.username, os.path.join(settings.MODOBOA_DIR, "tmp/virus.msg")
    )
    if status:
        return render_to_json_response(_("Message sent"))
    return render_to_json_response(error, status=500)