Corrigé Mail

Fixed Mail saying a message was not sent when it was, and long messages left unsent on leaving the page

After the Undo send countdown, Mail now says whether the message went from the result of that send. A long message waiting to be sent no longer stays in Drafts when you leave the page: it is sent as you leave, and the browser asks first so it has time to finish.

The held send asks public/mail.php for JSON (MailSendResult): the result of that send, with no flash left in the session for another page, instead of reading the flash from the page the redirect drew, which another tab could have taken first. A refused form token answers 419 and is renewed and sent again through MagpieCsrf. A message whose fields exceed the 64 KB a keepalive request allows is sent on beforeunload with the browser's leave prompt, rather than with a keepalive request on pagehide that the browser refuses.