{"componentChunkName":"component---src-gatsby-theme-chronoblog-templates-note-js","path":"/notes/emails-resend/","result":{"data":{"mdx":{"parent":{"__typename":"File","fields":{"gitLogLatestDate":"2026-11-20 18:00:09 +0100"}},"id":"1bbe97ca-f55a-5eda-bdbb-ee98823fb3b3","excerpt":"Resend  is a service for sending transactional e-mail over an HTTP API. The  free plan  includes 3,000 e-mails a month, with a limit of 10…","frontmatter":{"title":"Sending e-mails with Resend","date":"2026-11-19 17:05:00 UTC","job_ad":null,"job_ad_id":null,"job_ad_url":null,"tags":["node","resend"],"cover":{"childImageSharp":{"fluid":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAPoAAAD6AG1e1JrAAAAwUlEQVQoz7WS626DMAxGef9H7CjQStuSkG0ZDVkukFM1WzuEqv6iiSxbx5Zlf3LFxq/KObOlVZnfTzEKLJ78H+drxZUtmixYmXDLdcuESgSU9PQqYk8zMUxolZDiB/Hu+NCJlCYGMyGFL7yXkeBnnLvUhRtzY6bq2oGm+aTrBr5Nwp4cb6+euta0zRdSRJzz6D7QNoZ9rUt+tBFjHMfDyMtOcTxYRrta+U+ym1/Hd1lerbwUlzuiP2Lr/HPOZuvDPgO14xSF6pgqkgAAAABJRU5ErkJggg==","aspectRatio":2.0869565217391304,"src":"/static/1651e342335efb0ea8dc032fee23e0b8/c4ecb/cover.png","srcSet":"/static/1651e342335efb0ea8dc032fee23e0b8/57ab0/cover.png 192w,\n/static/1651e342335efb0ea8dc032fee23e0b8/f4739/cover.png 384w,\n/static/1651e342335efb0ea8dc032fee23e0b8/c4ecb/cover.png 768w","srcWebp":"/static/1651e342335efb0ea8dc032fee23e0b8/dd090/cover.webp","srcSetWebp":"/static/1651e342335efb0ea8dc032fee23e0b8/ae504/cover.webp 192w,\n/static/1651e342335efb0ea8dc032fee23e0b8/fef30/cover.webp 384w,\n/static/1651e342335efb0ea8dc032fee23e0b8/dd090/cover.webp 768w","sizes":"(max-width: 768px) 100vw, 768px","presentationWidth":768,"presentationHeight":366},"resize":{"src":"/static/1651e342335efb0ea8dc032fee23e0b8/c4ecb/cover.png"}}}},"fields":{"slug":"/notes/emails-resend/","readingTime":{"text":"1 min read"}},"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Sending e-mails with Resend\",\n  \"date\": \"2026-11-19 17:05:00 UTC\",\n  \"cover\": \"./cover.png\",\n  \"tags\": [\"node\", \"resend\"],\n  \"canonical_url\": \"https://sevic.dev/notes/emails-resend/\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://resend.com/\"\n  }), \"Resend\"), \" is a service for sending transactional e-mail over an HTTP API. The \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://resend.com/pricing\"\n  }), \"free plan\"), \" includes 3,000 e-mails a month, with a limit of 100 per day.\"), mdx(\"p\", null, \"Sending requires a verified domain and an API key. Verify the domain on the \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://resend.com/domains\"\n  }), \"Domains page\"), \". The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"from\"), \" address has to use that domain. Create an API key on the \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://resend.com/api-keys\"\n  }), \"API keys page\"), \" and store it as \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"RESEND_API_KEY\"), \".\"), mdx(\"p\", null, \"Install the Node.js client with \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"npm i resend\"), \". Pass that key to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"new Resend(apiKey)\"), \" to create the client. \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"resend.emails.send\"), \" sends one message: \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"from\"), \" is the sender, \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"to\"), \" is the list of recipients, \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"replyTo\"), \" is the address replies go to, \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"subject\"), \" is the subject line, and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"text\"), \" is the body.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-js\"\n  }), \"import { Resend } from 'resend';\\n\\nconst resend = new Resend(process.env.RESEND_API_KEY);\\n\\nconst { data, error } = await resend.emails.send({\\n  from: '\\\"Sender\\\" <sender@example.com>',\\n  to: ['recipient@example.com'],\\n  replyTo: 'sender@example.com',\\n  subject: 'Subject',\\n  text: 'Text'\\n});\\n\\nif (error) {\\n  throw new Error(error.message);\\n}\\n\\nconsole.log('Message sent: %s', data.id);\\n\")));\n}\n;\nMDXContent.isMDXComponent = true;"}},"pageContext":{"id":"1bbe97ca-f55a-5eda-bdbb-ee98823fb3b3"}},"staticQueryHashes":["1961101537","2542493696"]}