Skip to content

Delete SMTP Password method 🪪 Sub-Accounts

Deletes the SMTP password identified by its ID for the specified sub-account.

Usage

ts
import { MailChannelsClient, SubAccounts } from 'mailchannels-sdk'

const mailchannels = new MailChannelsClient('your-api-key')
const subAccounts = new SubAccounts(mailchannels)

const { success, error } = await subAccounts.deleteSmtpPassword('validhandle123', 1)
ts
import { MailChannels } from 'mailchannels-sdk'

const mailchannels = new MailChannels('your-api-key')

const { success, error } = await mailchannels.subAccounts.deleteSmtpPassword('validhandle123', 1)

Params

  • handle string required: The handle of the sub-account for which the SMTP password should be deleted.
  • id number required: The ID of the SMTP password to delete.

Response

  • success boolean guaranteed: Whether the operation was successful.
  • error ErrorResponse | null nullable: Error information if the operation failed.
    • message string guaranteed: A human-readable description of the error.
    • statusCode number | null nullable: The HTTP status code from the API, or null if the error is not related to an HTTP request. This field is intended for diagnostic use only and should not be relied upon.
    • type string guaranteed: A string identifier for the type of error. This field is intended for diagnostic use only and should not be relied upon.

Type declarations

Signature

ts
async function deleteSmtpPassword (handle: string, id: number): Promise<SuccessResponse>

Response type declarations

ts
interface ErrorResponse {
  message: string;
  statusCode: number | null;
  type: ErrorType;
}
ts
interface SuccessResponse {
  success: boolean;
  error: ErrorResponse | null;
}

Source

SourcePlaygroundDocsTests

Released under the MIT License.