Class SendApiResource

Direct Known Subclasses:
BulkEmailsImpl, SendingEmailsImpl, TestingEmailsImpl

public abstract class SendApiResource extends ApiResourceWithValidation
Abstract class representing a resource for sending emails via Mailtrap API.
  • Constructor Details

  • Method Details

    • validateRequestBodyOrThrowException

      protected void validateRequestBodyOrThrowException(MailtrapMail mail) throws InvalidRequestBodyException
      Validates the request body of an email message and throws an exception if it is invalid.
      Parameters:
      mail - The email message to be validated.
      Throws:
      InvalidRequestBodyException - If the request body is invalid.