Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pages/api/email-me.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import fs from "fs";
import { getSession } from "next-auth/react";
import path from "path";
import { resolveSafeTypeToFilename } from "../../lib/node-utils";
import PhundConfig from "../../phund.config";

sgMail.setApiKey(process.env.EMAIL_API_KEY);
function SplitFromEmailEnv(envVar) {
const first = envVar.indexOf("<");
Expand All @@ -20,7 +22,7 @@ export default async (req, res) => {
return res.status(403).json({ error: "Not authorized" });
}
const from = SplitFromEmailEnv(process.env.FROM_EMAIL);
const businessUserEmail = "jason@musicfox.io";
const businessUserEmail = PhundConfig?.businessUserEmail;
const notificationMessage =
"The following user emailed themselves our SAFE note. You should probably follow up tiger. ;-)\n\n";

Expand Down
3 changes: 3 additions & 0 deletions phund.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default PhundConfig = {
businessUserEmail: "phil@tincre.com",
};