<?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: Sahil Chhabra</title>
    <description>The latest articles on DEV Community by Sahil Chhabra (@sahil_chhabra_72f9879d40f).</description>
    <link>https://dev.to/sahil_chhabra_72f9879d40f</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4076781%2Fdc784091-38fa-4f97-866b-f29b4e252d9e.jpg</url>
      <title>DEV Community: Sahil Chhabra</title>
      <link>https://dev.to/sahil_chhabra_72f9879d40f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sahil_chhabra_72f9879d40f"/>
    <language>en</language>
    <item>
      <title>How to Send Your First Resend Email Without a Verified Domain (Node.js Edition)</title>
      <dc:creator>Sahil Chhabra</dc:creator>
      <pubDate>Thu, 13 Aug 2026 21:59:42 +0000</pubDate>
      <link>https://dev.to/sahil_chhabra_72f9879d40f/how-to-send-your-first-resend-email-without-a-verified-domain-nodejs-edition-78p</link>
      <guid>https://dev.to/sahil_chhabra_72f9879d40f/how-to-send-your-first-resend-email-without-a-verified-domain-nodejs-edition-78p</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Resend Documentation says that you will need to verify the domain before sending the email. However, in this blog, you will learn how to send your first email within 5 mins without verifying any domain&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Node.js, a free Resend account and 5 minutes of your time. That's it — no domain required.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1 : Get your API Key
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Go to resend.com&lt;/li&gt;
&lt;li&gt;Then sign in using Google or GitHub account &lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once you're logged in, look for API Keys in the left sidebar of your dashboard.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsh557drbfi740lw62fcn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsh557drbfi740lw62fcn.png" alt=" " width="242" height="434"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once Clicked on API Keys generate the API key and save it on the notepad &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;(Disclaimer never share your API Key with anyone or commit it to a public repo)&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Set up your project
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;If starting a new project:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a new folder and navigate into it, then run &lt;code&gt;npm init -y&lt;/code&gt; to set it up.&lt;/li&gt;
&lt;li&gt;Then follow the same steps below.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;If working on existing project:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open your terminal and navigate to your project directory.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run:&lt;br&gt;
&lt;code&gt;npm install resend dotenv&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once installed create a file named &lt;code&gt;.env&lt;/code&gt; in your main project directory and save your API Key in it like this:&lt;br&gt;
&lt;code&gt;RESEND_API_KEY=re_xxxxxxxxxxxxxx&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After saving your API Key, create a new file called &lt;code&gt;test.js&lt;/code&gt; (or use your existing &lt;code&gt;server.js&lt;/code&gt;) and paste in this code:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Resend&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;resend&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dotenv&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;config&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;resend&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Resend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;RESEND_API_KEY&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;testEmail&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;resend&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;emails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;onboarding@resend.dev&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;your-test_email@gmail.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Resend Test&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;html&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;h1&amp;gt;Resend is working!&amp;lt;/h1&amp;gt;&amp;lt;p&amp;gt;This is a test email.&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;❌ Resend Error:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;✅ Email sent successfully!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Email ID:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;❌ Server Error:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;testEmail&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Notice the &lt;code&gt;from&lt;/code&gt; address is &lt;code&gt;onboarding@resend.dev&lt;/code&gt; — this is Resend's built-in test sender, which is why you don't need your own verified domain yet.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Run the code and check the result
&lt;/h2&gt;

&lt;p&gt;In your terminal, run:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;node test.js&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If everything is set up correctly, you'll see something like this in your terminal:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;✅ Email sent successfully!&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Email ID: 49a3999c-...&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Resend also gives you an &lt;code&gt;id&lt;/code&gt; for every email you send. You can use this ID later to check delivery status if you're building something more advanced, like a webhook or event tracker.&lt;/p&gt;

&lt;p&gt;Now check the inbox of the email address you used in the &lt;code&gt;to&lt;/code&gt; field — you should see your test email arrive within a few seconds, with the subject "Resend Test."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A quick note on what's happening behind the scenes:&lt;/strong&gt; since you're using &lt;code&gt;onboarding@resend.dev&lt;/code&gt; as the sender, Resend routes the email through its own shared test domain. This is perfect for development, but for a real product, you'd eventually verify your own domain so emails are sent from your brand's address instead — which is a topic for another post.&lt;/p&gt;

&lt;h2&gt;
  
  
  A few things that could go wrong
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"Missing API key" error&lt;/strong&gt; — Double check your &lt;code&gt;.env&lt;/code&gt; file is saved in the same directory as your &lt;code&gt;test.js&lt;/code&gt; file, and that you spelled &lt;code&gt;RESEND_API_KEY&lt;/code&gt; correctly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Email not arriving&lt;/strong&gt; — Check your spam folder first. If it's still missing, log into your Resend dashboard and check the "Emails" tab — it shows the delivery status of every email you've sent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Cannot find module 'resend'&lt;/code&gt; error&lt;/strong&gt; — This usually means the install didn't finish. Run &lt;code&gt;npm install resend dotenv&lt;/code&gt; again inside your project folder.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;And that's it — you just sent your first email with Resend, without touching domain verification at all. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;onboarding@resend.dev&lt;/code&gt; address is great for development and testing, but keep in mind it's not meant for production use. Once you're ready to send real emails to your users under your own brand, check out Resend's guide on &lt;a href="https://resend.com/docs/add-a-domain" rel="noopener noreferrer"&gt;verifying a domain&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you found this useful, let me know in the comments — and feel free to share what you're building with Resend!&lt;/p&gt;

</description>
      <category>resend</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
