Skip to content

Commit

Permalink
feat: in progress mailgun integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrastopoulos committed Sep 8, 2024
1 parent e463e34 commit 70314b2
Show file tree
Hide file tree
Showing 4 changed files with 5,601 additions and 4,025 deletions.
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
"postinstall": "prisma generate",
"lint": "next lint",
"start": "next start",
"format": "yarn prettier . --write --ignore-path ./.gitignore"
"format": "yarn prettier . --write --ignore-path ./.gitignore",
"email-dev": "email dev",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@clerk/nextjs": "^4.29.7",
"@headlessui/react": "^1.7.13",
"@headlessui/tailwindcss": "^0.1.3",
"@hookform/resolvers": "^2.9.11",
"@prisma/client": "^4.12.0",
"@react-email/components": "^0.0.25",
"@tailwindcss/typography": "^0.5.7",
"@tanstack/react-query": "^4.24.6",
"@trpc/client": "^10.11.0",
Expand All @@ -24,6 +27,7 @@
"@trpc/server": "^10.11.0",
"clsx": "^1.2.1",
"daisyui": "^2.39.1",
"mailgun.js": "^10.2.3",
"mongodb": "^4.11.0",
"next": "14",
"next-themes": "^0.2.1",
Expand All @@ -38,6 +42,7 @@
"react-toastify": "^9.0.8",
"sharp": "^0.31.1",
"superjson": "1.9.1",
"tsx": "^4.19.0",
"zod": "^3.21.4",
"zod-validation-error": "^0.2.1",
"zustand": "^4.3.3"
Expand All @@ -62,6 +67,7 @@
"prettier-plugin-organize-imports": "^3.2.2",
"prettier-plugin-tailwindcss": "^0.2.2",
"prisma": "^4.12.0",
"react-email": "^3.0.1",
"tailwindcss": "^3.2.0",
"typescript": "^4.8.4"
}
Expand Down
9 changes: 9 additions & 0 deletions src/lib/mailgun.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import FormData from 'form-data';
import Mailgun from 'mailgun.js';

const mailgun = new Mailgun(FormData);

export const mg = mailgun.client({
username: 'api',
key: process.env.MAILGUN_API_KEY || 'key-yourkeyhere'
});
13 changes: 5 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
"compilerOptions": {
"baseUrl": "src",
"target": "ESNext",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"paths": {
"~/*": ["*"]
},
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand Down Expand Up @@ -34,7 +33,5 @@
"**/*.mjs",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
"exclude": ["node_modules"]
}
Loading

0 comments on commit 70314b2

Please sign in to comment.