← back to Purelymail Mcp
fix createUser: split full address into userName(local)+domainName (Purelymail rejects full address as 'could not be parsed')
9e7d347def8ad80139bc3050a629f5083a2b5d2e · 2026-06-21 19:59:48 -0700 · Steve
Files touched
Diff
commit 9e7d347def8ad80139bc3050a629f5083a2b5d2e
Author: Steve <steve@designerwallcoverings.com>
Date: Sun Jun 21 19:59:48 2026 -0700
fix createUser: split full address into userName(local)+domainName (Purelymail rejects full address as 'could not be parsed')
---
index.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/index.js b/index.js
index 2655ebd..60dc9ff 100755
--- a/index.js
+++ b/index.js
@@ -228,8 +228,13 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
data = await call("deleteRoutingRule", { routingRuleId: args.routingRuleId });
break;
case "purelymail_create_user": {
+ // Purelymail createUser expects userName = LOCAL PART + domainName separately,
+ // NOT the full address (full address -> "Request could not be parsed"). Split it.
+ const addr = String(args.userName);
+ const at = addr.lastIndexOf("@");
const body = {
- userName: args.userName,
+ userName: at >= 0 ? addr.slice(0, at) : addr,
+ domainName: at >= 0 ? addr.slice(at + 1) : args.domainName,
password: args.password,
enablePasswordReset: args.enablePasswordReset ?? true,
};
← 1503e81 initial scaffold (gitify-all 2026-05-06)
·
back to Purelymail Mcp
·
(newest)