Skip to content

Provide the ability to send pre-encoded attachments #573

@dmittriy13

Description

@dmittriy13

Issue

We store attachments encoded in base64 in the database; the current library API does not allow sending pre-encoded attachments. Instead, we have to decode them and then provide them to the library to re-encode just before sending them.

Steps to Reproduce

  1. Create an builder using EmailBuilder.startingBlank().
  2. Add an attachment that is already encoded, for example in base64
  3. Call EmailBuilder#build for create new email.
  4. Call Mailer#send for send email.

Expected Behavior

The attachment will not be re-encoded, but will be sent in the current encoding.

Actual Behavior

The attachment will be re-encoded

Request

It is necessary to be able to indicate that the attachment is already encoded and specify the encoding. The library should use jakarta.mail.internet.PreencodedMimeBodyPart as a container for such attachments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions