weird redirect on button press

i’m trying to create a sendmail page to share posts from a test application i’m building through a guide,but the sendmail button redirect me to /accounts/login/ instead of sending the mail,can someone help me make this thing right? obvs ask me for what files/code snippet you need to troubleshoot

Can you post your file, your LOGIN_REDIRECT_URL from, and possibly your file, please?