Skip to content

Enhancement: Add high-level Email interface for convenience #2

@akberc

Description

@akberc

Summary

Add a convenience wrapper that provides a high-level Email interface for common use cases.

Motivation

Currently, developers need to manually parse headers, extract addresses, and handle MIME parts. A high-level interface would simplify common email operations.

Proposed API

\\ ypescript
interface Email {
uid: number;
subject: string;
from: { name: string; email: string };
to: { name: string; email: string }[];
date: Date;
body?: string;
attachments?: Attachment[];
}

// Usage
const emails = await client.getEmails('INBOX', { limit: 10 });
\\

Benefits

  • Reduces boilerplate for common use cases
  • Provides parsed headers out of the box
  • Handles MIME structure automatically

Labels

enhancement

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions