<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by COLORMONO on Medium]]></title>
        <description><![CDATA[Stories by COLORMONO on Medium]]></description>
        <link>https://medium.com/@colormono?source=rss-bd7b24a75498------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*2mw-doeDBF8LNfmX.</url>
            <title>Stories by COLORMONO on Medium</title>
            <link>https://medium.com/@colormono?source=rss-bd7b24a75498------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 12:22:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@colormono/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Create a Simple Form That Sends You an Email for Static Websites]]></title>
            <link>https://medium.com/@colormono/create-a-simple-form-that-sends-you-an-email-for-static-websites-2102a28a6204?source=rss-bd7b24a75498------2</link>
            <guid isPermaLink="false">https://medium.com/p/2102a28a6204</guid>
            <category><![CDATA[forms]]></category>
            <category><![CDATA[static-site]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[serverless]]></category>
            <dc:creator><![CDATA[COLORMONO]]></dc:creator>
            <pubDate>Mon, 05 Oct 2020 22:52:16 GMT</pubDate>
            <atom:updated>2020-10-05T22:52:16.488Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kmU20_t5LdX5E3xh" /><figcaption>Photo by <a href="https://unsplash.com/@hostreviews?utm_source=medium&amp;utm_medium=referral">Stephen Phillips - Hostreviews.co.uk</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Goal</h3><p>Create a Contact Form for a Static Website that send values by email on Submit. Use only HTML, CSS and JS, NO server side setup.</p><h3>Tech stack</h3><ul><li><a href="https://app.sendgrid.com/guide/integrate/langs/smtp">SendGrid</a></li><li><a href="https://www.smtpjs.com/">SmtpJS.com</a></li><li><a href="https://github.com/alpinejs/alpine">GitHub - alpinejs/alpine: A rugged, minimal framework for composing JavaScript behavior in your markup.</a></li></ul><h3>Step 1: Create SendGrid Account</h3><p>We’ll be using SendGrid for email delivery service.</p><ul><li>Create a <strong>free account</strong>: <a href="https://signup.sendgrid.com/">https://signup.sendgrid.com/</a></li><li>Create a <strong>Single sender </strong><em>(click on the blue button)</em></li><li>Fill the form, check your email and validate the entered address.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*PSrboZDkcTdx0iTwx30wKQ.png" /><figcaption>Click on the “Create a Single Sender” Button</figcaption></figure><ul><li>On the sidebar Click: <strong>Email API &gt; Integration Guide</strong></li><li>Pick<strong> SMTP Relay</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*cp-I-uh3EJBQxdB_fqYe6Q.png" /></figure><ul><li><strong>Create a new Key</strong> and don’t close this tab yet, you’ll be using this information on the next step.</li></ul><h3>Step 2: Setup SMTP</h3><ul><li>In a new tab go to <a href="http://smtpjs.com/">SMTP JS</a></li><li>Find and click the “Encrypt your SMTP Credentials” button</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OsMj15EhA-drq2u9XQoSzQ.png" /></figure><p>Use:</p><ul><li>SMTP Host: smtp.sendgrid.net</li><li>SMTP Username: apikey</li><li>SMTP Password: your_sendgrid_key</li><li>Domain: leave it empty <em>(use your domain for production!)</em></li><li>Use SSL: no for this example</li><li>Port: 25</li></ul><p>Don’t close the modal, you’ll be using that <strong>Secure Token</strong> on the next step.</p><h3>Step 3: Create the Form</h3><p>Use static HTML markup for the form &lt;form …&gt; and <a href="https://github.com/alpinejs/alpine">Alpine.js</a> to validate the fields and submitting with a nice sending indicator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iVmPv2i1Xjdv8NOAMJuaNQ.png" /><figcaption>This approach was implemented at http://truenorth.co</figcaption></figure><p><strong>Include the SMTPJS script to your HTML:</strong></p><pre>&lt;script src=&quot;https://smtpjs.com/v3/smtp.js&quot;&gt;<br>&lt;/script&gt;</pre><p><strong>Attach this script to the onSubmit event:</strong></p><pre>Email.send({<br> SecureToken : ‘your_smtpjs_secure-token’,<br> From : ‘<a href="/service/mailto:account@domain.com">account@domain.com</a>’, // Verified Sender <br> To : ‘<a href="/service/mailto:account@domain.com">account@domain.com</a>’, <br> Subject : ‘New web connection’,<br> Body : msgBody<br>}).then(message =&gt; {<br> console.log(message);<br>});</pre><h3>SOURCE CODE</h3><p><a href="https://codepen.io/colormono/embed/XWKrgqg?height=378&amp;theme-id=dark&amp;default-tab=html,result">https://codepen.io/colormono/embed/XWKrgqg</a></p><p>Hope you like it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2102a28a6204" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>