Unfortunately you can’t do IMAP/SMTP Client side Browser Webapp (Javascript): https://stackoverflow.com/questions/3775191/javascript-imap-and-smtp-client
You could do it inside Chrome/Firefox Apps + you don’t need a server to deliver the webapp. Would be the best way… autocrypt could be the tricky part without the core…