SENDUNE: an HTML email design tool that lets you design your newsletter in a nice drag and drop interface, then export your HTML. Also, it’s open source and you can check the code in github.

https://designer.sendune.com/

Open source, drag and drop HTML email designer. | SENDUNE

Design responsive HTML emails that work in every email client. Fast and light weight. MIT license. https://github.com/SendWithSES/Drag-and-Drop-Email-Designer

SENDUNE