invalidate the session when done and mail is sent