# Class: MailSlurp
# Hierarchy
- MailSlurp
# Constructors
# constructor
+ new MailSlurp(opts
: Config): MailSlurp
Defined in src/index.ts:99 (opens new window)
Parameters:
Name | Type | Description |
---|---|---|
opts | Config |
Returns: MailSlurp
# Properties
# aliasController
• aliasController: AliasControllerApi
Defined in src/index.ts:93 (opens new window)
# attachmentController
• attachmentController: AttachmentControllerApi
Defined in src/index.ts:87 (opens new window)
# bulkController
• bulkController: BulkActionsControllerApi
Defined in src/index.ts:90 (opens new window)
# commonController
• commonController: CommonActionsControllerApi
Defined in src/index.ts:89 (opens new window)
# contactController
• contactController: ContactControllerApi
Defined in src/index.ts:96 (opens new window)
# domainController
• domainController: DomainControllerApi
Defined in src/index.ts:95 (opens new window)
# emailController
• emailController: EmailControllerApi
Defined in src/index.ts:85 (opens new window)
# formController
• formController: FormControllerApi
Defined in src/index.ts:94 (opens new window)
# groupController
• groupController: GroupControllerApi
Defined in src/index.ts:97 (opens new window)
# inboxController
• inboxController: InboxControllerApi
Defined in src/index.ts:86 (opens new window)
# templateController
• templateController: TemplateControllerApi
Defined in src/index.ts:98 (opens new window)
# waitController
• waitController: WaitForControllerApi
Defined in src/index.ts:91 (opens new window)
# webhookController
• webhookController: WebhookControllerApi
Defined in src/index.ts:99 (opens new window)
# Methods
# createInbox
▸ createInbox(emailAddress?
: string, name?
: string, description?
: string, expiresAt?
: Date, favourite?
: boolean, tags?
: Array‹string›): Promise‹Inbox›
Defined in src/index.ts:157 (opens new window)
Parameters:
Name | Type |
---|---|
emailAddress? | string |
name? | string |
description? | string |
expiresAt? | Date |
favourite? | boolean |
tags? | Array‹string› |
Returns: Promise‹Inbox›
# deleteEmail
▸ deleteEmail(emailId
: string): Promise‹Response›
Defined in src/index.ts:343 (opens new window)
Parameters:
Name | Type | Description |
---|---|---|
emailId | string | emailId |
Returns: Promise‹Response›
# deleteInbox
▸ deleteInbox(inboxId
: string): Promise‹Response›
Defined in src/index.ts:182 (opens new window)
Parameters:
Name | Type | Description |
---|---|---|
inboxId | string | inboxId |
Returns: Promise‹Response›
# downloadAttachment
▸ downloadAttachment(emailId
: string, attachmentId
: string): Promise‹String›
Defined in src/index.ts:441 (opens new window)
Parameters:
Name | Type | Description |
---|---|---|
emailId | string | emailId |
attachmentId | string | attachmentId |
Returns: Promise‹String›
# emptyInbox
▸ emptyInbox(inboxId
: string): Promise‹Response›
Defined in src/index.ts:193 (opens new window)
Parameters:
Name | Type | Description |
---|---|---|
inboxId | string | inboxId |
Returns: Promise‹Response›
# getAllEmails
▸ getAllEmails(page?
: number, size?
: number, inboxId?
: Array‹string›, sort?
: SortEnum, unreadOnly?
: boolean): Promise‹PageEmailProjection›
Defined in src/index.ts:358 (opens new window)
Parameters:
Name | Type |
---|---|
page? | number |
size? | number |
inboxId? | Array‹string› |
sort? | SortEnum |
unreadOnly? | boolean |
Returns: Promise‹PageEmailProjection›
# getAllInboxes
▸ getAllInboxes(page?
: number, size?
: number, favourite?
: boolean, search?
: string, sort?
: SortEnum, tag?
: string): Promise‹PageInboxProjection›
Defined in src/index.ts:228 (opens new window)
Parameters:
Name | Type |
---|---|
page? | number |
size? | number |
favourite? | boolean |
search? | string |
sort? | SortEnum |
tag? | string |
Returns: Promise‹PageInboxProjection›
# getAttachmentMetaData
▸ getAttachmentMetaData(attachmentId
: string, emailId
: string): Promise‹AttachmentMetaData›
Defined in src/index.ts:474 (opens new window)
Parameters:
Name | Type | Description |
---|---|---|
attachmentId | string | attachmentId |
emailId | string | emailId |
Returns: Promise‹AttachmentMetaData›
# getEmail
▸ getEmail(emailId
: string): Promise‹Email›
Defined in src/index.ts:403 (opens new window)
Parameters:
Name | Type | Description |
---|---|---|
emailId | string | emailId |
Returns: Promise‹Email›
# getEmails
▸ getEmails(inboxId
: string, args
: GetMessagesOptions): Promise‹EmailPreview[]›
Defined in src/index.ts:382 (opens new window)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
inboxId | string | - | Id of inbox that emails belongs to |
args | GetMessagesOptions | {} | - |
Returns: Promise‹EmailPreview[]›
# getInbox
▸ getInbox(inboxId
: string): Promise‹Inbox›
Defined in src/index.ts:204 (opens new window)
Parameters:
Name | Type | Description |
---|---|---|
inboxId | string | inboxId |
Returns: Promise‹Inbox›
# getInboxes
▸ getInboxes(): Promise‹Inbox[]›
Defined in src/index.ts:214 (opens new window)
Returns: Promise‹Inbox[]›
# getRawEmail
▸ getRawEmail(emailId
: string): Promise‹string›
Defined in src/index.ts:414 (opens new window)
Parameters:
Name | Type | Description |
---|---|---|
emailId | string | emailId |
Returns: Promise‹string›
# sendEmail
▸ sendEmail(inboxId
: string, sendEmailOptions
: SendEmailOptions): Promise‹Response›
Defined in src/index.ts:426 (opens new window)
Parameters:
Name | Type | Description |
---|---|---|
inboxId | string | ID of the inbox you want to send the email from |
sendEmailOptions | SendEmailOptions | - |
Returns: Promise‹Response›
# uploadAttachment
▸ uploadAttachment(options
: UploadAttachmentOptions): Promise‹Array‹String››
Defined in src/index.ts:458 (opens new window)
Parameters:
Name | Type |
---|---|
options | UploadAttachmentOptions |
Returns: Promise‹Array‹String››
# waitForEmailCount
▸ waitForEmailCount(count?
: number, inboxId?
: string, timeout?
: number, unreadOnly?
: boolean): Promise‹EmailPreview[]›
Defined in src/index.ts:322 (opens new window)
Parameters:
Name | Type |
---|---|
count? | number |
inboxId? | string |
timeout? | number |
unreadOnly? | boolean |
Returns: Promise‹EmailPreview[]›
# waitForLatestEmail
▸ waitForLatestEmail(inboxId?
: string, timeout?
: number, unreadOnly?
: boolean): Promise‹Email›
Defined in src/index.ts:256 (opens new window)
Parameters:
Name | Type |
---|---|
inboxId? | string |
timeout? | number |
unreadOnly? | boolean |
Returns: Promise‹Email›
# waitForMatchingEmails
▸ waitForMatchingEmails(matchOptions
: MatchOptions, count?
: number, inboxId?
: string, timeout?
: number, unreadOnly?
: boolean): Promise‹EmailPreview[]›
Defined in src/index.ts:297 (opens new window)
Parameters:
Name | Type | Description |
---|---|---|
matchOptions | MatchOptions | matchOptions |
count? | number | - |
inboxId? | string | - |
timeout? | number | - |
unreadOnly? | boolean | - |
Returns: Promise‹EmailPreview[]›
# waitForNthEmail
▸ waitForNthEmail(inboxId
: string, index
: number, timeout?
: number, unreadOnly?
: boolean): Promise‹Email›
Defined in src/index.ts:273 (opens new window)
Parameters:
Name | Type |
---|---|
inboxId | string |
index | number |
timeout? | number |
unreadOnly? | boolean |
Returns: Promise‹Email›