<?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 Gabor Ottlik on Medium]]></title>
        <description><![CDATA[Stories by Gabor Ottlik on Medium]]></description>
        <link>https://medium.com/@gaborottlik?source=rss-8527fb590411------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Gabor Ottlik on Medium</title>
            <link>https://medium.com/@gaborottlik?source=rss-8527fb590411------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 21:57:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gaborottlik/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[Use AWS SES with GoDaddy and Gatsby]]></title>
            <link>https://medium.com/@gaborottlik/use-aws-ses-with-godaddy-and-gatsby-c91c7e999b90?source=rss-8527fb590411------2</link>
            <guid isPermaLink="false">https://medium.com/p/c91c7e999b90</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[godaddy]]></category>
            <category><![CDATA[e]]></category>
            <category><![CDATA[cognito]]></category>
            <dc:creator><![CDATA[Gabor Ottlik]]></dc:creator>
            <pubDate>Fri, 20 Sep 2019 06:24:10 GMT</pubDate>
            <atom:updated>2019-09-20T06:24:10.529Z</atom:updated>
            <content:encoded><![CDATA[<p>If we are building a simple website with contact us page we are more likely to have to set up some sort of email integration where you can send email on behalf of your page visitor to your business email. I’m building a restaurant website and I wanted to integrate a general contact us and table reserving functionality. I’m using Gatsby as a static site generator and it provide multiple way to get email service up and running.</p><ul><li>You could either use <strong>Netlify</strong> which will cost $19/month for 1000 submission.</li><li>You could use <strong>Formspree</strong> which has a free tier or you can have 1000 submission for $10 with numerous other features like 6 linked email unlimited forms.</li><li>You could also deploy your <strong>own solution</strong> that processing and sending emails.</li></ul><p>Fortunately AWS has an easy to use email service called <strong>AWS SES</strong> sands for simple email service. The pricing is reasonable, you pay:</p><ul><li>$0 for the first 62,000 emails you send each month, and $0.10 for every 1,000 emails you send after that.</li><li>$0.10 for every 1,000 emails you send.</li><li>$0 for the first 1,000 emails you receive, and $0.10 for every 1,000 emails you receive after that.</li></ul><p>So I decided next to amazon.</p><h3><em>Seetting up AWS </em>Simple Email Service</h3><p>AWS SES sound like a simple solution for my case and it needed just a couple of step in order to integration with my domain provider GoDaddy.</p><ul><li>First you have to open up the AWS Simple Email Service console</li><li>Select the AWS region you want to verify your emails on</li><li>And then click on verify a new domain. Then you will type in your domain as your-domain.com. Generate DMIK is not important at the moment unless you want cryptographic encoding four your messages.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aQacZogYbzE053vFpiHJOQ.png" /></figure><p>In the Domain Verification Record box you will see a record which has a type column with TXT value. This is what you have to add to your domain provider’s DNS setting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LrEkom45xPK82Y7ej3iaBQ.png" /></figure><p>For this example I’ll use GoDaddy but you can also read how to integrate with different DNS/Hosting Provider <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/dns-txt-records.html">here</a>.</p><p>Head over to GoDaddy and register your domain by clicking on <strong>My Products.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*GSbzSdlyZRJMIR7goA1Cyw.png" /></figure><p>Click on <strong>DNS</strong> button to set the TXT record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NFbE2gvNwhuF19YPVgin6A.png" /></figure><p>At the bottom of the Record table you will see and <strong>Add link</strong>, when clicking on that select TXT so you can enter the TXT Name as host and the TXT Value you’ve got from AWS. Once done it may take from a few minutes to a day to get this through.</p><p>If it’s done you should see a green verify text un the <strong>Verification status</strong> column. When you see Yes at Enables for Sending go ahead and test it by checking the domain and clicking on Send a Test Email.</p><p>If your use case requires the email with the verified domain as a sender you can test is here otherwise go to Email Addresses in the left side panel and send with the email you want to use as a sender.</p><h3>Moving out of sandbox</h3><p>Using SES out of the box will comes with certain restriction. The sender and the recipient can only be verified. 200 email in 24 hours and only 1 email per second. If want custom quote from AWS you have to file a case but you will find more information on this <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html">link</a>. Moving out of sendbox also allows sending and receiving emails from a non verified email. You can request a quote of daily sent email. In my case it’s 50,000 messages per day.</p><p>You have to comply with the <a href="http://aws.amazon.com/aup">AWS Acceptable Use Policy</a> (AUP) and the <a href="http://aws.amazon.com/serviceterms">AWS Service Terms</a>.</p><p>You also have to indicate how to handle bounces and complaints.</p><h3>Calling AWS SDK with Cognito</h3><p>The way you can send email from your application depend on what platform you use. In this article I will only discuss how to call the AWS JS SDK from the browser.</p><p>In order to make SES API calls you have to configure your SDK. It’s important to configure what region you set up your SES service.</p><p>In Gatsby you first have to import your SDK in the body. I’ll use the CDN version of the SDK. Helmet will put the script in the body but you can only call AWS services upon interpreting the script.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dd7ab255c5473d6747fbdc50a2b11cf1/href">https://medium.com/media/dd7ab255c5473d6747fbdc50a2b11cf1/href</a></iframe><p>So you either write your logic in the componentDidMount or in an eventHandler. I attached a click event handler to a button which on call will grab the form data and pass it to the sendEmail function.</p><p>AWS Cognito is one way how you can call SES API from browser.</p><p>Once you opened up the Cognito console you have to create a User Pool by clicking on Manage User Pools the next step Create a user pool. Give a name for your pool and click on the review default. At the moment we only go with basic settings. The only thing you have to change is the App client section click on the pencil for editing and fill the client name and make sure generate client secret is checked in. Head to create app client. Return to pool details and you can finalise your setting by clicking on Create pool.</p><p>Two thing you will need to create a Federated Identity. The Pool ID and the Application client ID.</p><p>In the top bar you will see the Federated Identity button by clicking that you can create new identity pool. Give a name to the pool and make sure you’re clicking on the Enable access to the unauthenticated identity. With this you can send and email with unverified <strong>to</strong> and <strong>from</strong> address. Then create pool.</p><p>As a next step you will need to assign IAM roles to the Identity pool for both authenticated and unauthenticated identities. This is autogenerated but later you can modify it tailored to your need.</p><p>The final step is to choose which platform you want to integrate from. I use Javascript and paste the code in your app.</p><p>Use AWS SDK</p><p>Once you pasted the SDK’s script in the body you can start using it. You have to configure the region and also set up the credentials with CognitoIdentityCredentials.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f82c3270ec50fafb1e7cef3ab9d39c6c/href">https://medium.com/media/f82c3270ec50fafb1e7cef3ab9d39c6c/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c91c7e999b90" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>