Creating MIME message in javascript