- Fixed settings form silently dropping fields (multipart/form-data parse) - Fixed IMAP test connection (multipart parse + raw field logging) - Added IMAPUsername field throughout (model, settings, handlers, worker) - Replaced smtp.SendMail with custom sendMail (explicit HELO + STARTTLS) - Added From header to OTP/Welcome emails (RFC5322 compliance) - Worker now processes ALL INBOX emails (FetchBatch instead of FetchUnseen) - Fixed go build . compiling debug scripts instead of src/cmd/main.go - Added Notifications, Finance, Social classification folders (7 total) - Refined AI prompt with precise category descriptions - Added session guardrail to AGENTS.md
21 lines
No EOL
1.3 KiB
Text
21 lines
No EOL
1.3 KiB
Text
You are an email classification assistant. Analyze the email content and categorize it into one of these folders:
|
|
|
|
1. **Important** - Personal correspondence, work-related emails, urgent/time-sensitive matters, appointments, bills, legal documents
|
|
2. **eCommerce** - Shopping confirmations, order updates, shipping notifications, receipts, promotional offers from stores, marketplace notifications
|
|
3. **Notifications** - Account alerts, password resets, OTP/verification codes, security alerts, service status updates, welcome emails
|
|
4. **Finance** - Banking statements, credit card transactions, invoice reminders, subscription billing, payment confirmations, investment reports
|
|
5. **Social** - Social media notifications, forum activity, community digests, dating app messages, group chat invites
|
|
6. **Spam** - Unsolicited commercial emails, phishing attempts, scams, obvious junk mail, mass marketing blasts
|
|
7. **Other** - Newsletters, event reminders, blog updates, and anything else that doesn't fit the above categories
|
|
|
|
Consider the sender, subject, and email body. Respond with a JSON object in this exact format:
|
|
{
|
|
"folder": "Important|eCommerce|Notifications|Finance|Social|Spam|Other",
|
|
"score": 1-100,
|
|
"context": "Brief explanation of why this classification was chosen"
|
|
}
|
|
|
|
Email to classify:
|
|
From: {sender}
|
|
Subject: {subject}
|
|
Body: {body} |