Skip to content

Add Option to Easily Extract Attachments from Emails Without Packaging into .eml Files #276

@Ashraf-wan

Description

@Ashraf-wan

I noticed that when sending emails with attachments (using tools like swaks), the attachments are bundled inside the .eml file in Base64 format.

When sending an email with swaks and using the --attach option, PaperCut captures the entire email (along with attachments) in a single .eml file, but its better to have an option where the attachments are automatically saved in the same directory (or configurable path) as separate files rather than being packaged within the .eml file.

Activity

Jaben

Jaben commented on Oct 20, 2024

@Jaben
Member

but its better to have an option where the attachments are automatically saved in the same directory

Why is that better?

In v7.0 there is a new rule called "Invoke Process":

image

You can use that execute a small utility that can extract the attachments out of the EML, if you want. Something like this: https://pypi.org/project/eml-extractor/

Kissaki

Kissaki commented on Oct 24, 2024

@Kissaki
Contributor

File attachments have file names. Saving them in the same folder would lead to conflicts between emails.

Emails can have any number of mime bodies. Papercut is a simple email server. I think it makes perfect sense for it to save the eml file in its entirety, and not interpret one or the other type of content one way or another. If you want it to save file attachments separately, maybe you also want it to save HTML and plaintext bodies as HTML and txt files? Where does it end? Is that still a simple server?

You didn't describe a use case. For me, a single eml for every email makes perfect sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Kissaki@Jaben@Ashraf-wan

        Issue actions

          Add Option to Easily Extract Attachments from Emails Without Packaging into .eml Files · Issue #276 · ChangemakerStudios/Papercut-SMTP