postmark-mcp 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -8
- package/package.json +1 -1
package/index.js
CHANGED
@@ -130,17 +130,18 @@ function registerTools(server, postmarkClient) {
|
|
130
130
|
tag: z.string().optional().describe("Optional tag for categorization"),
|
131
131
|
inReplyTo: z.string().optional().describe("Message ID this email is in reply to (optional)")
|
132
132
|
},
|
133
|
-
async ({ to, subject, textBody, htmlBody, from, tag }) => {
|
134
|
-
const headers = [
|
135
|
-
{ "Name": "In-Reply-To", "Value": inReplyTo },
|
136
|
-
{ "Name": "References", "Value": inReplyTo }
|
137
|
-
];
|
133
|
+
async ({ to, subject, textBody, htmlBody, from, tag, inReplyTo }) => {
|
138
134
|
const emailData = {
|
139
135
|
From: from || defaultSender,
|
140
136
|
To: to,
|
141
137
|
Subject: subject,
|
142
138
|
TextBody: textBody,
|
143
|
-
Headers: inReplyTo
|
139
|
+
Headers: inReplyTo
|
140
|
+
? [
|
141
|
+
{ Name: "In-Reply-To", Value: inReplyTo },
|
142
|
+
{ Name: "References", Value: inReplyTo }
|
143
|
+
]
|
144
|
+
: undefined,
|
144
145
|
MessageStream: defaultMessageStream,
|
145
146
|
TrackOpens: true,
|
146
147
|
TrackLinks: "HtmlAndText"
|
@@ -149,9 +150,9 @@ function registerTools(server, postmarkClient) {
|
|
149
150
|
if (htmlBody) emailData.HtmlBody = htmlBody;
|
150
151
|
if (tag) emailData.Tag = tag;
|
151
152
|
|
152
|
-
console.error(
|
153
|
+
console.error("Sending email...", { to, subject });
|
153
154
|
const result = await postmarkClient.sendEmail(emailData);
|
154
|
-
console.error(
|
155
|
+
console.error("Email sent successfully:", result.MessageID);
|
155
156
|
|
156
157
|
return {
|
157
158
|
content: [{
|