Package io.mailtrap.api.testingemails
Class TestingEmailsImpl
java.lang.Object
io.mailtrap.api.apiresource.ApiResource
io.mailtrap.api.apiresource.ApiResourceWithValidation
io.mailtrap.api.apiresource.SendApiResource
io.mailtrap.api.testingemails.TestingEmailsImpl
- All Implemented Interfaces:
TestingEmails
Implementation of the
TestingEmails interface for sending emails in the sandbox environment.-
Field Summary
Fields inherited from class io.mailtrap.api.apiresource.ApiResourceWithValidation
mailtrapValidatorFields inherited from class io.mailtrap.api.apiresource.ApiResource
apiHost, httpClient, token -
Constructor Summary
ConstructorsConstructorDescriptionTestingEmailsImpl(MailtrapConfig config, MailtrapValidator mailtrapValidator) -
Method Summary
Modifier and TypeMethodDescriptionbatchSend(MailtrapBatchMail mail, long inboxId) send(MailtrapMail mail, long inboxId) Sends an emailMethods inherited from class io.mailtrap.api.apiresource.SendApiResource
validateBatchPayload, validateMailPayloadMethods inherited from class io.mailtrap.api.apiresource.ApiResourceWithValidation
validateRequestBodyAndThrowException
-
Constructor Details
-
TestingEmailsImpl
-
-
Method Details
-
send
Description copied from interface:TestingEmailsSends an email- Specified by:
sendin interfaceTestingEmails- Parameters:
mail- The email message to be sent.inboxId- ID of the testing inbox, where to send an email.- Returns:
- A response indicating the result of the send operation.
-
batchSend
public BatchSendResponse batchSend(MailtrapBatchMail mail, long inboxId) throws HttpException, InvalidRequestBodyException - Specified by:
batchSendin interfaceTestingEmails- Throws:
HttpExceptionInvalidRequestBodyException
-