Skip to content

Reading attachements reads nothing #43

Open
@Jomy10

Description

@Jomy10

When I try to read an attachement, there are no bytes returned

var content []byte
size, err := attachement.Data.Read(content)
// size = 0

The email roughly looks like this:

Content-Type: multipart/mixed; boundary="000000000000f229a405f393ef1b"
<!-- ... -->

--000000000000f229a405f393ef1b
Content-Type: multipart/alternative; boundary="000000000000f229a105f393ef19"

--000000000000f229a105f393ef19
Content-Type: text/plain; charset="UTF-8"

<!-- ... -->

--000000000000f229a105f393ef19
Content-Type: text/html; charset="UTF-8"

<!-- ... -->

--000000000000f229a105f393ef19--
--000000000000f229a405f393ef1b
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document;
        name="bondsstaf 27_01_2023 JULIE.docx"
Content-Disposition: attachment; filename="bondsstaf 27_01_2023 JULIE.docx"
Content-Transfer-Encoding: base64
Content-ID: <f_ldkltcqk0>
X-Attachment-Id: f_ldkltcqk0

<!-- attachement in base64 ... -->
--000000000000f229a405f393ef1b--

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