2026-01-30 17:23:07 -05:00
|
|
|
from django.contrib import messages
|
2026-01-30 16:21:32 -05:00
|
|
|
from django.core.mail import send_mail
|
|
|
|
|
from django.shortcuts import redirect
|
2026-01-29 15:21:54 -05:00
|
|
|
|
2026-01-30 16:21:32 -05:00
|
|
|
def send_login_email(request):
|
|
|
|
|
email = request.POST["email"]
|
2026-01-30 17:23:07 -05:00
|
|
|
send_mail(
|
|
|
|
|
"A magic login link to your Dashboard",
|
|
|
|
|
"Use this magic link to login to your Dashboard",
|
|
|
|
|
"adman@howdy.earthmanrpg.me",
|
|
|
|
|
[email],
|
|
|
|
|
)
|
|
|
|
|
messages.success(
|
|
|
|
|
request,
|
|
|
|
|
"Check your email!—there you'll find a magic login link. But hurry… it's only temporary!",
|
|
|
|
|
)
|
2026-01-30 16:21:32 -05:00
|
|
|
return redirect("/")
|