Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

email attachments? #241

Closed
praul opened this issue Dec 14, 2020 · 34 comments
Closed

email attachments? #241

praul opened this issue Dec 14, 2020 · 34 comments
Assignees
Labels
enhancement New feature or request

Comments

@praul
Copy link

praul commented Dec 14, 2020

Hi and first of all, thanks for listmonk, I really like the clean , decluttered approach.

I need to send emails with pdfs as attachment.
Is that possible, supported or planned?

Thanks for answering

@knadh
Copy link
Owner

knadh commented Dec 15, 2020

Thanks @praul. Attachments aren't immediately planned as they're an unlikely usecase in newsletters and mailing lists. They can also significantly affect bandwidth usage and performance of campaigns.

@knadh knadh added the question Further information is requested label Dec 15, 2020
@Trapulo
Copy link

Trapulo commented Jan 12, 2021

I'm also interested in this..

thanks

@m42e
Copy link
Contributor

m42e commented Jan 25, 2021

What is the benefit of sending the PDF via mail than to add a Tracking Dowload Link?

@Trapulo
Copy link

Trapulo commented Jan 25, 2021

You do not need a storage where leave them available...

@knadh knadh closed this as completed Mar 2, 2021
@Empty2k12
Copy link

We're also interested in this feature. When sending out press releases we sometimes like to attach the press release as a PDF or add additional images that should not appear in the e-mail test itself. It's a standard practice to attach things to e-mails in this context.

@knadh knadh added enhancement New feature or request and removed question Further information is requested labels Jun 9, 2021
@knadh
Copy link
Owner

knadh commented Jun 9, 2021

I'll look into this once after the next major release (bounce processing). This is not a trivial feature to implement. Re-opening the issue for now.

@knadh knadh reopened this Jun 9, 2021
@avanier
Copy link
Contributor

avanier commented Mar 10, 2022

I'm going to agree, this feature is a bit of a slippery slope, but I can also add other potential use-cases.

Our use is internal and we could really use attaching .ics files or meeting invites to certain campaigns.

Edit: If a vendor started doing this to me in their mailing lists I'm not sure what my reaction would be ... but it wouldn't be good! >_< From a "Don't do unto others" point of view, I'm not sure this should be permitted.

@emacsen
Copy link

emacsen commented Jun 1, 2022

I have exactly the same need as @avanier in regards to ics files, which is why I was searching out a solution and found this issue.

@xam-ps
Copy link

xam-ps commented Aug 30, 2022

I use listmonk to send out newsletter for our fire department and here it would also be quite helpful to be able to attach files.

@knadh
Copy link
Owner

knadh commented Aug 31, 2022

I've looked into this and enabling native attachments poses several technical challenges.

  • When an attachment is uploaded to a campaign, it has to be stored somewhere. The existing image/media upload backend can be used for this.
  • When a campaign is being processed, the attachments have to be read and held in memory. Reading from disk or S3 per message is not practical. However, large attachments could pose problems when held in-memory.
  • How can file deletion be handled (from the media gallery) when there's a running campaign or a paused campaign?

What is easier is to refactor the media upload feature to accept arbitrary file types and not just images. Then the richtext toolbar can then get a button that opens up the file gallery that inserts the link to the desired file in the campaign body. Not an e-mail attachment, but simpler UX for uploading and linking files from within listmonk.

@NicoHood
Copy link
Contributor

But keep in mind: This would make the attachment public visible to anyone with the link. E-Mail attachments are just sent 1:1 normally. That'swhy I'd say this is a campaign-specific upload and should not be merged with the media library?

  • We need a new backend/api
  • The file deletion problem will be solved.

@xam-ps
Copy link

xam-ps commented Aug 31, 2022

Probably quite a unique use case, but I run listmonk in a Docker container on my local NAS and use AWS SES to send out the mails. So a link to listmonk is not helping a lot in my situation. But not sure if that's a problem that anyone except of me has tbh 😅

@jkibasui
Copy link

I have the same needs as @emacsen and @avanier in regards to attaching ics files. Additionally, I have implemented listmonk to handle all transactional email and there is a need for attaching invoices that has arisen recently. Hope the demand for the feature is not too overwhelming. Thanks

@ShurayukiHime
Copy link

Hi,
do I get it right that it is still not possible to add attachments to emails, and that this is also not a TODO?

Thank you.

@knadh
Copy link
Owner

knadh commented Nov 10, 2022

Hi @ShurayukiHime. There's no support right now. How best to implement this is something we're pondering on this thread. No concrete ideas yet.

@kettenbach-it
Copy link

Would be very much interested in that. As someone already mentioned: for press releases, this is a very important feature

@msbt
Copy link

msbt commented Apr 12, 2023

Chiming in here as well, would be great to allow embedded images (so they won't be blocked by mail-clients) and attachment of small files (pdfs), is this something you're actively working on? I see that #1243 got merged, but I don't get how to add attachments to a campaign.

@knadh
Copy link
Owner

knadh commented Apr 13, 2023

Have started working on adding attachments support. Should be available in the next version.
image

  • Upload arbitrary files to the media gallery (filesystem or S3 backend).
  • Add them as attachments to campaigns. Files that are attached are pulled once and held in memory for the duration of the campaign.
  • If an attached file is deleted during the campaign, it does not effect a running campaign. If the program is restarted, then the file is lost from memory and is no longer attached. Fair game in that rare scenario.
  • While files of any size can be attached, it most likely will not be ideal to attach large files due to obvious reasons (memory, network throughput). That's left to the user.

@msbt
Copy link

msbt commented Apr 13, 2023

@knadh oh wow, this sounds awesome! Does this mean inline images will be working as well without pulling from the server?

@knadh
Copy link
Owner

knadh commented Apr 14, 2023

@msbt attaching files is the first step to inserting content inline. Yep, will be exploring how to do that.

@msbt
Copy link

msbt commented May 9, 2023

Hey @knadh, how are things with this one, is this somewhere on the roadmap to be implemented soon or is there no bandwidth available for that feature?

@knadh
Copy link
Owner

knadh commented May 18, 2023

This is now merged 3b9a0f7. listmonk now supports uploading of arbitrary files and file attachments on campaigns. Thanks for your patience!

image

@knadh knadh closed this as completed May 18, 2023
@knadh knadh self-assigned this May 18, 2023
@kettenbach-it
Copy link

Are you planning to build a docker container with that so it's easier for us to deploy it?

@knadh
Copy link
Owner

knadh commented May 19, 2023

I'm refactoring the media upload UI/UX to make this a little easier. Once that is done, I can push a release candidate if you want to try it out before the next major release.

@kettenbach-it
Copy link

Yes, I'd definitivly try it asap, since I'm really looking forward to this feature

@GrafDokula
Copy link

Hi, any news regarding this? We highly anticipate that feature as our newsletters most of the time contain an attachment.

@knadh
Copy link
Owner

knadh commented Jun 27, 2023

This is already merged and will be available in the upcoming release (next month).

@kettenbach-it
Copy link

@knadh Could you create the release? I'd definitly like the attachments but I don't want to become n internal maintainer of release of containers of listmonk

@knadh
Copy link
Owner

knadh commented Jul 27, 2023

v2.5.0 is stated to be released next week. Currently load testing it.

@kettenbach-it
Copy link

Any news from 2.5.0? I see there's a container 2.5.0-rc1 at dockerhub. Is it safe to try that out?

@xam-ps
Copy link

xam-ps commented Aug 11, 2023

https://github.com/knadh/listmonk/releases/tag/v2.5.0

@kettenbach-it
I was really looking forward to this feature as well, bug please be aware, that most of the open source devs/maintainer spend their free time on those projects and we have to be happy about every minute they contribute to those projects. If you want/need features (faster), find yourself a paid developer and let them do the work and be nice and open a pull request, if you want to give sth. back to the community, especially if you use it in a professional way.

@julienvienne
Copy link

Thank you for that great feature.
Do you plan to make it accessible through the POST /api/campaigns endpoint ?

@knadh
Copy link
Owner

knadh commented Aug 30, 2023

Hi @julienvienne. It already is. Haven't had a chance to document this, but you can inspect the request on the browser when you save/update a campaign and just send those same fields in the API.

@hdeadman
Copy link

Now that attachments with Content-Disposition of type attachment are supported, is there a plan to support the inline content-disposition? The UI would need to allow users to designate attachments as either inline or attached, and it would help if the UI displayed the content identifier for each inline attachment somewhere for use in the HTML img tags.

The answer in the following link is a good description of what mime type (multipart/related) and headers are required to support an inline image:
https://stackoverflow.com/a/65053178

This is a good post about how to support a mix of inline attachments (e.g. images) and attached attachments.
https://stackoverflow.com/questions/30351465/html-email-with-inline-attachments-and-non-inline-attachments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests