MCP Server 2.0 (#452)
* MCP Server 2.0 - Updated application version from 2.23.14 to 2.24.0 in package.json. - MCP Server improved with new features - Migrated functionality from Dev Tools to MCP Server - Improved getMonitoringProvider not to crash application when misconfigured
This commit is contained in:
committed by
GitHub
parent
059408a70a
commit
f3ac595d06
@@ -1,6 +1,10 @@
|
||||
'use server';
|
||||
|
||||
import { loadEmailTemplate } from '@/app/emails/lib/email-loader';
|
||||
import {
|
||||
createKitEmailsDeps,
|
||||
createKitEmailsService,
|
||||
} from '@kit/mcp-server/emails';
|
||||
import { findWorkspaceRoot } from '@kit/mcp-server/env';
|
||||
|
||||
export async function sendEmailAction(params: {
|
||||
template: string;
|
||||
@@ -27,7 +31,10 @@ export async function sendEmailAction(params: {
|
||||
},
|
||||
});
|
||||
|
||||
const { html } = await loadEmailTemplate(params.template);
|
||||
const rootPath = findWorkspaceRoot(process.cwd());
|
||||
const service = createKitEmailsService(createKitEmailsDeps(rootPath));
|
||||
const result = await service.read({ id: params.template });
|
||||
const html = result.renderedHtml ?? result.source;
|
||||
|
||||
return transporter.sendMail({
|
||||
html,
|
||||
|
||||
Reference in New Issue
Block a user