<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Peter Sugihara</title>
    <description>The latest articles on DEV Community by Peter Sugihara (@rgbrgb).</description>
    <link>https://dev.to/rgbrgb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F896726%2Fe2dbed26-6bcb-410a-8e9e-621db6b047fc.jpeg</url>
      <title>DEV Community: Peter Sugihara</title>
      <link>https://dev.to/rgbrgb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rgbrgb"/>
    <language>en</language>
    <item>
      <title>Mailing: Build, test, send emails with TypeScript and React</title>
      <dc:creator>Peter Sugihara</dc:creator>
      <pubDate>Sun, 24 Jul 2022 16:00:54 +0000</pubDate>
      <link>https://dev.to/rgbrgb/mailing-build-test-send-emails-with-typescript-and-react-2m64</link>
      <guid>https://dev.to/rgbrgb/mailing-build-test-send-emails-with-typescript-and-react-2m64</guid>
      <description>&lt;h3&gt;
  
  
  &lt;a href="https://github.com/successor-software/mailing"&gt;Github link&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;We’re longtime users of Action Mailer and wanted something similar for our typescript/react apps. We didn’t find anything, so we decided to build Mailing. We added some small features that we would’ve liked in Action Mailer, including a mobile preview toggle (with hotkeys), and the ability to send a test email right from the browser while developing. Finally, we went all in on MJML so that we never have to think about nested tables or email clients :)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;HTML is simple, why a framework?&lt;/em&gt;&lt;br&gt;
Writing raw HTML for emails is a bit like making a website in 1999… table layout, inline styling, no JS at runtime. As modern web frameworks mature it becomes more and more arcane relative to the rest of the codebase.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Why code emails at all?&lt;/em&gt;&lt;br&gt;
There are a lot of nice no-code SaaS email solutions these days, but sometimes you want your app to be self-contained or need more automated testability or you want to enforce a design system programatically. I’ve hit all of the above and I’m also just more comfortable expressing layout as code than learning a bespoke WYSIWYG editor.&lt;/p&gt;

&lt;p&gt;At our real estate startup, one of our most loved features was an email digest of new properties matching your search criteria. It was a cornerstone retention mechanism and we had a ton of logic (and tests) ensuring that it wasn’t sent twice in a day, never contained the same property more than once in a week, had the properties ordered in a certain way, could be retried on failure, metered sends over time to avoid self-DDOS etc, etc. As we grew and started moving some stuff to Mailchimp and Iterable for marketing to own, product emails with a ton of logic stayed in the codebase where they could be tested.&lt;/p&gt;

&lt;p&gt;Without further adieu, please check it out and LMK if you find it useful (or bugs). Thanks!!&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;a href="https://github.com/successor-software/mailing"&gt;Check it out on Github!&lt;/a&gt;
&lt;/h1&gt;

</description>
      <category>typescript</category>
      <category>react</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
