sendlix
    Preparing search index...

    Class EmailClient

    Client for interacting with Sendlix Email Service API Provides methods for sending various types of emails

    Hierarchy

    • Client<typeof gRPCEmailClient>
      • EmailClient
    Index
    • Closes the client connection Should be called when the client is no longer needed to free resources

      Returns void

    • Sends an email with the specified configuration

      Parameters

      Returns Promise<Response>

      Promise resolving to the email send response

      const client = new EmailClient('your-api-key');
      const response = await client.sendEmail({
      from: { email: 'sender@example.com', name: 'Sender Name' },
      to: [{ email: 'recipient@example.com', name: 'Recipient Name' }],
      subject: 'Test Email',
      content: {
      value: '<h1>Hello World!</h1><p>This is a test email.</p>',
      type: 'html'
      },
      });
    • Sends a pre-formatted email in raw EML format

      For more information on how to we handle raw emails, please refer to the documentation:

      https://docs.sendlix.com/emlemail

      Parameters

      • eml: string | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>

        Raw email in EML format, can be a filepath string

      • OptionaladditionalOptions: AdditionalEmailOptions

        Optional additional settings

      Returns Promise<Response>

      Promise resolving to the email send response

    • Sends an email to a group of recipients identified by a group ID

      Parameters

      Returns Promise<void>

      Promise that resolves when the group send job was successfully created