Package io.mailtrap.api.sendingemails
Class SendingEmailsImpl
java.lang.Object
io.mailtrap.api.apiresource.ApiResource
io.mailtrap.api.apiresource.ApiResourceWithValidation
io.mailtrap.api.apiresource.SendApiResource
io.mailtrap.api.sendingemails.SendingEmailsImpl
- All Implemented Interfaces:
SendingEmails
Implementation of the
SendingEmails
interface for sending emails in the production environment.-
Field Summary
Fields inherited from class io.mailtrap.api.apiresource.ApiResourceWithValidation
mailtrapValidator
Fields inherited from class io.mailtrap.api.apiresource.ApiResource
apiHost, httpClient, token
-
Constructor Summary
ConstructorsConstructorDescriptionSendingEmailsImpl
(MailtrapConfig config, MailtrapValidator mailtrapValidator) -
Method Summary
Modifier and TypeMethodDescriptionbatchSend
(MailtrapBatchMail mail) send
(MailtrapMail mail) Sends an emailMethods inherited from class io.mailtrap.api.apiresource.SendApiResource
validateBatchPayload, validateMailPayload
Methods inherited from class io.mailtrap.api.apiresource.ApiResourceWithValidation
validateRequestBodyAndThrowException
-
Constructor Details
-
SendingEmailsImpl
-
-
Method Details
-
send
Description copied from interface:SendingEmails
Sends an email- Specified by:
send
in interfaceSendingEmails
- Parameters:
mail
- The email message to be sent.- Returns:
- A response indicating the result of the send operation.
-
batchSend
public BatchSendResponse batchSend(MailtrapBatchMail mail) throws HttpException, InvalidRequestBodyException - Specified by:
batchSend
in interfaceSendingEmails
- Throws:
HttpException
InvalidRequestBodyException
-