pinme-email
Skill3.7k starsChanged 5 months agoMITView on GitHub
Use this skill when a PinMe project (Worker TypeScript) needs to integrate email sending (send_email). Guides AI to generate correct Worker TS code.
- Reads credentials
- Sends data out
Trending
More talk lately.thin dataabout the whole repository
Who's talking about glitternetwork/pinme
- ProSkillsMD/proskills“[Candidate] glitternetwork/pinme/skills/pinme-email - pinme-email”GitHub · Oct 3, 2026
- ProSkillsMD/proskills“[Candidate] glitternetwork/pinme/skills/pinme-auth - pinme-auth”GitHub · Oct 3, 2026
- ProSkillsMD/proskills“[Candidate] glitternetwork/pinme/skills/pinme - pinme”GitHub · Oct 3, 2026
- sudosubin/agents.nix“agent-skills.github.glitternetwork.pinme: init at 2.0.12”GitHub · Sep 27, 2026
- xiaolai/nlpm“Audit candidate: glitternetwork/pinme”GitHub · May 4, 2026
The biggest 5 of 7 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 7
Talked about on GitHub (7 times).
On GitHub · 7
- Oct 3, 2026[Candidate] glitternetwork/pinme/skills/pinme-email - pinme-email — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 3, 2026[Candidate] glitternetwork/pinme/skills/pinme-auth - pinme-auth — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 3, 2026[Candidate] glitternetwork/pinme/skills/pinme - pinme — ProSkillsMD/proskills0 reactions · 1 comment
- Sep 27, 2026agent-skills.github.glitternetwork.pinme: init at 2.0.12 — sudosubin/agents.nix0 reactions
- May 4, 2026Audit candidate: glitternetwork/pinme — xiaolai/nlpm0 reactions · 3 comments
2 more on GitHub
- Jan 17, 2026PinMe:零成本三秒发布你的网站 — xiuji008/xiuji008.github.io0 reactions
- Jan 12, 2026Unable to bind to ENS name — timfong888/filecoin-pay-console0 reactions
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- pinme-authSkill
- pinme-llmSkill
- pinme-r2Skill
- pinme-shareSkill
- pinmeSkill
- pinme-uniwebpaySkill
The file
Files
PinMe Worker Email API Integration
Guides how to call PinMe platform's email sending API in a PinMe Worker (TypeScript).
Environment Variables
The following environment variables are automatically injected when the Worker is created — no manual configuration needed:
// backend/src/worker.ts
export interface Env {
DB: D1Database;
API_KEY: string; // Project API Key — used for send_email authentication
BASE_URL?: string; // Optional override for PinMe API base URL, defaults to https://pinme.cloud
}
API_KEYis the sole credential for the Worker to call PinMe platform APIs. WhenBASE_URLis not set, it defaults tohttps://pinme.cloud.
Send Email API
Endpoint: POST {BASE_URL}/api/v4/send_email
Authentication: X-API-Key header (using env.API_KEY)
Sender: Automatically set to {project_name}@pinme.cloud
Request Format
{
"to": "user@example.com",
"subject": "Your verification code",
"html": "<p>Your code is <strong>123456</strong></p>"
}| Field | Type | Required | Description |
to | string | Yes | Recipient email address |
subject | string | Yes | Email subject |
html | string | Yes | HTML body |
Response Format
Success (200):
{ "code": 200, "msg": "ok", "data": { "ok": true } }Errors:
| HTTP Status | Meaning | data.error Example |
| 401 | API Key missing or invalid | "X-API-Key header is required" / "Invalid API key" |
| 400 | Parameter validation failed | "Invalid email address" / "Subject is required" |
| 500 | Email service error | "Failed to send email" |
Worker Example Code
async function sendEmail(env: Env, to: string, subject: string, html: string): Promise<{ ok: boolean; error?: string }> {
const baseUrl = env.BASE_URL ?? 'https://pinme.cloud';
const resp = await fetch(`${baseUrl}/api/v4/send_email`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': env.API_KEY,
},
body: JSON.stringify({ to, subject, html }),
});
const result = await resp.json() as { code: number; msg: string; data?: { ok?: boolean; error?: string } };
if (resp.status !== 200 || result.code !== 200) {
return { ok: false, error: result.data?.error || result.msg || 'Unknown error' };
}
return { ok: true };
}
// Usage in routes
async function handleSendVerification(request: Request, env: Env): Promise<Response> {
const { email } = await request.json() as { email: string };
const code = Math.random().toString().slice(2, 8);
const result = await sendEmail(env, email, 'Verification Code',
`<p>Your code is <strong>${code}</strong></p>`);
if (!result.ok) {
return json({ error: result.error }, 500);
}
return json({ ok: true });
}Error Handling Pattern
PinMe platform API unified response format:
interface PinmeResponse<T = unknown> {
code: number; // 200=success, other=failure
msg: string; // "ok" | "error" | "invalid params"
data?: T; // Business data on success, may contain { error: string } on failure
}Recommended Unified Error Handler
async function callPinmeAPI<T>(url: string, apiKey: string, body: unknown): Promise<{ data?: T; error?: string }> {
let resp: Response;
try {
resp = await fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-API-Key': apiKey },
body: JSON.stringify(body),
});
} catch {
return { error: 'Network error' };
}
if (!resp.ok) {
try {
const err = await resp.json() as PinmeResponse;
return { error: err.data && typeof err.data === 'object' && 'error' in err.data
? (err.data as { error: string }).error
: err.msg || `HTTP ${resp.status}` };
} catch {
return { error: `HTTP ${resp.status}` };
}
}
const result = await resp.json() as PinmeResponse<T>;
if (result.code !== 200) {
return { error: result.data && typeof result.data === 'object' && 'error' in result.data
? (result.data as { error: string }).error
: result.msg };
}
return { data: result.data as T };
}Usage Example
const baseUrl = env.BASE_URL ?? 'https://pinme.cloud';
// Send email
const emailResult = await callPinmeAPI<{ ok: boolean }>(
`${baseUrl}/api/v4/send_email`, env.API_KEY,
{ to: 'user@example.com', subject: 'Hello', html: '<p>Hi</p>' },
);
if (emailResult.error) return json({ error: emailResult.error }, 500);Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

