{"_id":"@bradford/svelte-mail","name":"@bradford/svelte-mail","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.5":{"name":"@bradford/svelte-mail","version":"0.0.5","description":"Build emails with Svelte","author":{"name":"Carsten Lebek"},"devDependencies":{"@iconify-json/ri":"^1.1.4","@sveltejs/adapter-auto":"^2.0.0","@sveltejs/kit":"^1.5.0","@sveltejs/package":"^1.0.0","@svelteness/kit-docs":"^1.1.1","@types/gtag.js":"^0.0.12","@types/html-to-text":"^9.0.0","@types/pretty":"^2.0.1","@typescript-eslint/eslint-plugin":"^5.45.0","@typescript-eslint/parser":"^5.45.0","autoprefixer":"^10.4.13","clsx":"^1.2.1","csstype":"^3.1.1","eslint":"^8.28.0","eslint-config-prettier":"^8.5.0","eslint-plugin-svelte3":"^4.0.0","i":"^0.3.7","npm":"^9.4.1","postcss":"^8.4.21","prettier":"^2.8.0","prettier-plugin-svelte":"^2.8.1","shiki":"^0.14.0","svelte-check":"^3.0.1","tailwindcss":"^3.2.4","tslib":"^2.4.1","typescript":"^4.9.3","unplugin-icons":"^0.15.2","vite":"^4.0.0"},"type":"module","dependencies":{"html-to-text":"^9.0.3","pretty":"^2.0.0","svelte":"^3.55.1","tw-to-css":"^0.0.12"},"main":"svelte.config.js","license":"ISC","exports":{"./package.json":"./package.json","./components/Body.svelte":"./components/Body.svelte","./components/Button.svelte":"./components/Button.svelte","./components/Column.svelte":"./components/Column.svelte","./components/Container.svelte":"./components/Container.svelte","./components/Head.svelte":"./components/Head.svelte","./components/Heading.svelte":"./components/Heading.svelte","./components/Hr.svelte":"./components/Hr.svelte","./components/Html.svelte":"./components/Html.svelte","./components/Img.svelte":"./components/Img.svelte","./components/Link.svelte":"./components/Link.svelte","./components/Preview.svelte":"./components/Preview.svelte","./components/Section.svelte":"./components/Section.svelte","./components/Tailwind.svelte":"./components/Tailwind.svelte","./components/Text.svelte":"./components/Text.svelte",".":"./index.js","./render":"./render.js","./utils/tailwind":"./utils/tailwind.js","./utils":"./utils.js"},"svelte":"./index.js","_id":"@bradford/svelte-mail@0.0.5","gitHead":"983c7875f20a4fb4c2fbfa560682d2b6ac453570","_nodeVersion":"20.5.0","_npmVersion":"9.8.0","dist":{"integrity":"sha512-5v57E/hPaVIKITMPc9MZEpn1gBefI4WCLCG3VRV5/2NgWugk7rYTtBiYmO82zHFK8fB6pJxEuDu4nWdoCfs2Bw==","shasum":"d351374e19ed35b0585e8fa4e159ecc8e311ebf5","tarball":"https://registry.npmjs.org/@bradford/svelte-mail/-/svelte-mail-0.0.5.tgz","fileCount":51,"unpackedSize":266557,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnNS8e+59VHc95t5KQQlWyHTEAcaFN2JVe+suJBJ8gKAIgGuCyZWmoSCmBaql48mDTSylZLYJdEa8UlFjkHnjDMsc="}]},"_npmUser":{"name":"bradford","email":"bradford.toney@gmail.com"},"directories":{},"maintainers":[{"name":"bradford","email":"bradford.toney@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svelte-mail_0.0.5_1700242654675_0.2914869597768923"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-17T17:37:34.574Z","0.0.5":"2023-11-17T17:37:34.827Z","modified":"2023-11-17T17:37:35.091Z"},"maintainers":[{"name":"bradford","email":"bradford.toney@gmail.com"}],"description":"Build emails with Svelte","author":{"name":"Carsten Lebek"},"license":"ISC","readme":"![svelte-mail-banner](https://user-images.githubusercontent.com/59960385/216772883-6cc40ff9-ef6e-4269-bed3-17c1023bbaf6.png)\n\n<div align=\"center\"><strong>Svelte Email</strong></div>\n<div align=\"center\">Designing emails has never been easier.</div>\n<br />\n<div align=\"center\">\n<a href=\"https://svelte-mail.vercel.app/\">Documentation</a>\n<span> · </span>\n<a href=\"https://github.com/carstenlebek/svelte-mail\">GitHub</a>\n</div>\n\n# Introduction\n\nAfter seeing [react-email](https://github.com/resendlabs/react-email) I have decided to create a similar library for Svelte. `svelte-mail` enables you to write and design email templates with svelte and render them to HTML or plain text.\n\n# Installation\n\nInstall the package to your existing SvelteKit project:\n\n```bash title=\"npm\"\nnpm install svelte-mail\n```\n\n```bash title=\"pnpm\"\npnpm install svelte-mail\n```\n\n# Getting started\n\n## 1. Create an email using Svelte\n\n`src/$lib/emails/Hello.svelte`\n\n```html\n<script>\n\timport { Button, Hr, Html, Text, Tailwind } from 'svelte-mail';\n\n\texport let name = 'World';\n</script>\n\n<!-- Optional Tailwind support  -->\n<Tailwind>\n\t<html lang=\"en\">\n\t\t<Text class=\"text-xl leading-10\"> Hello, {name}! </Text>\n\n\t\t<hr />\n\n\t\t<button href=\"https://svelte.dev\">Visit Svelte</button>\n\t</html>\n</Tailwind>\n```\n\n## 2. Send email\n\nThis example uses [Nodemailer](https://nodemailer.com/about/) to send the email. You can use any other email service provider.\n\n`src/routes/emails/hello/+server.js`\n\n```js\nimport { render } from 'svelte-mail';\nimport Hello from '$lib/emails/Hello.svelte';\nimport nodemailer from 'nodemailer';\n\nconst transporter = nodemailer.createTransport({\n\thost: 'smtp.ethereal.email',\n\tport: 587,\n\tsecure: false,\n\tauth: {\n\t\tuser: 'my_user',\n\t\tpass: 'my_password'\n\t}\n});\n\nconst emailHtml = render({\n\ttemplate: Hello,\n\tprops: {\n\t\tname: 'Svelte'\n\t}\n});\n\nconst options = {\n\tfrom: 'you@example.com',\n\tto: 'user@gmail.com',\n\tsubject: 'hello world',\n\thtml: emailHtml\n};\n\ntransporter.sendMail(options);\n```\n\n# Documentation\n\nFor more information, please visit the [documentation](https://svelte-mail.vercel.app/).\n\n# Components\n\nA set of standard components to help you build amazing emails without having to deal with the mess of creating table-based layouts and maintaining archaic markup.\n\n- [HTML](https://svelte-mail.vercel.app/docs/components/HTML)\n- [Head](https://svelte-mail.vercel.app/docs/components/head)\n- [Heading](https://svelte-mail.vercel.app/docs/components/heading)\n- [Button](https://svelte-mail.vercel.app/docs/components/button)\n- [Link](https://svelte-mail.vercel.app/docs/components/link)\n- [Image](https://svelte-mail.vercel.app/docs/components/image)\n- [Divider](https://svelte-mail.vercel.app/docs/components/hr)\n- [Paragraph](https://svelte-mail.vercel.app/docs/components/paragraph)\n- [Container](https://svelte-mail.vercel.app/docs/components/container)\n- [Preview](https://svelte-mail.vercel.app/docs/components/preview)\n- [Body](https://svelte-mail.vercel.app/docs/components/body)\n- [Column](https://svelte-mail.vercel.app/docs/components/column)\n- [Section](https://svelte-mail.vercel.app/docs/components/section)\n\n# Integrations\n\nEmails built with React Email can be converted into HTML and sent using any email service provider. Here are some examples:\n\n- [Nodemailer](https://github.com/resendlabs/react-email/tree/main/examples/nodemailer)\n- [SendGrid](https://github.com/resendlabs/react-email/tree/main/examples/sendgrid)\n- [Postmark](https://github.com/resendlabs/react-email/tree/main/examples/postmark)\n- [AWS SES](https://github.com/resendlabs/react-email/tree/main/examples/aws-ses)\n\n## Author\n\n- Carsten Lebek ([@carstenlebek](https://twitter.com/carstenlebek1))\n\n### Authors of the original project [react-email](https://github.com/resendlabs/react-email)\n\n- Bu Kinoshita ([@bukinoshita](https://twitter.com/bukinoshita))\n- Zeno Rocha ([@zenorocha](https://twitter.com/zenorocha))\n","readmeFilename":"README.md"}