Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MailService

Hierarchy

  • MailService

Index

Constructors

constructor

Methods

getMessage

  • getMessage(authEmail: string, messageId: string): null | Thread
  • Get database thread, from a user message

    Parameters

    • authEmail: string

      The auth user email

    • messageId: string

      A Gmail message id

    Returns null | Thread

getThread

  • getThread(authEmail: string, threadId: string): null | Thread
  • Get a database thread, from a user thread

    Parameters

    • authEmail: string

      The auth user email

    • threadId: string

      A Gmail thread id

    Returns null | Thread

getThreadChildren

  • getThreadChildren(authEmail: string, threadId: string): Thread[]
  • Get database threads (its messages only), from a user thread

    Parameters

    • authEmail: string

      The auth user email

    • threadId: string

      A Gmail thread id

    Returns Thread[]

getThreadFull

  • getThreadFull(authEmail: string, threadId: string, grouping?: boolean): Thread[] | GroupingThread
  • Get full database threads (thread + its messages), from a user thread

    Parameters

    • authEmail: string

      The auth user email

    • threadId: string

      A Gmail thread id

    • Default value grouping: boolean = false

      Group threads

    Returns Thread[] | GroupingThread

getThreadsByCategory

  • getThreadsByCategory(authEmail: string, categoryName: string, full?: boolean, grouping?: boolean): Thread[] | GroupingThread[]
  • Get database threads, from category-based threads

    Parameters

    • authEmail: string

      The auth user email

    • categoryName: string

      Mailing category name

    • Default value full: boolean = false
    • Default value grouping: boolean = false

    Returns Thread[] | GroupingThread[]

quota

  • quota(): number

replyMessage

  • replyMessage<TemplateData>(authEmail: string, messageId: string, input: MailingInput<TemplateData>, replyAll?: boolean): GmailMessage
  • Reply to an email message

    Type parameters

    • TemplateData

    Parameters

    • authEmail: string

      The auth user email

    • messageId: string

      Thread to be replied to

    • input: MailingInput<TemplateData>
    • Default value replyAll: boolean = false

      Is replied to all recipients

    Returns GmailMessage

replyMessageAll

  • replyMessageAll<TemplateData>(authEmail: string, messageId: string, input: MailingInput<TemplateData>): GmailMessage
  • Reply all to an email message

    Type parameters

    • TemplateData

    Parameters

    • authEmail: string

      The auth user email

    • messageId: string

      Thread to be replied to

    • input: MailingInput<TemplateData>

    Returns GmailMessage

replyThread

  • replyThread<TemplateData>(authEmail: string, threadId: string, input: MailingInput<TemplateData>, replyAll?: boolean): GmailThread
  • Reply to an email thread

    Type parameters

    • TemplateData

    Parameters

    • authEmail: string

      The auth user email

    • threadId: string

      Thread to be replied to

    • input: MailingInput<TemplateData>
    • Default value replyAll: boolean = false

      Is replied to all recipients

    Returns GmailThread

replyThreadAll

  • replyThreadAll<TemplateData>(authEmail: string, threadId: string, input: MailingInput<TemplateData>): GmailThread
  • Reply all to an email thread

    Type parameters

    • TemplateData

    Parameters

    • authEmail: string

      The auth user email

    • threadId: string

      Thread to be replied to

    • input: MailingInput<TemplateData>

    Returns GmailThread

send

  • send<TemplateData>(recipient: string, subject: string, input: MailingInput<TemplateData>, categoryName?: string): { threadId: string }
  • Send a new email

    Type parameters

    • TemplateData

    Parameters

    • recipient: string
    • subject: string
    • input: MailingInput<TemplateData>
    • Default value categoryName: string = "uncategorized"

      Mailing category name

    Returns { threadId: string }

    • threadId: string

Generated using TypeDoc