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

Query : Will this bundle handle numerous attachments #2

Open
asmafarhat2006 opened this issue Sep 28, 2023 · 8 comments
Open

Query : Will this bundle handle numerous attachments #2

asmafarhat2006 opened this issue Sep 28, 2023 · 8 comments

Comments

@asmafarhat2006
Copy link

asmafarhat2006 commented Sep 28, 2023

HI
Im facing an issue with Symfony mailer where attaching numerous files in the same email gives me Out of memory exception .
Note my files are already persisted and saved way before sending the email
Im thinking of using this bundle to resolve this, but Im not sure if it will , it seems it still builds up those attachments in the same message? The bundle only makes sure they are persisted before sending them or am I missing something

Any advice will be appreciated

@arjanfrans
Copy link
Member

Hey. It might resolve it, it depends on what your current setup looks like. Could you share your configuration related to email?

This bundle doesn't store the attachments inside the message, it writes them one by one to the filesystem (or somewhere else if you implement it).

@asmafarhat2006
Copy link
Author

asmafarhat2006 commented Oct 2, 2023 via email

@arjanfrans
Copy link
Member

Do you attach the files like this: https://symfony.com/doc/current/mailer.html#file-attachments

You could easily try out this bundle, it doesn't require any configuration.

@asmafarhat2006
Copy link
Author

asmafarhat2006 commented Oct 2, 2023 via email

@arjanfrans
Copy link
Member

Yes, the attachments will be there.

But since you are using the file system anyway, then you probably don't need this bundle.

The purpose of this bundle is to abstract away the persisting (so for example you could also use a cloud storage for them) and to avoid that the actual message queue contains potentially large files.

@asmafarhat2006
Copy link
Author

asmafarhat2006 commented Oct 2, 2023 via email

@arjanfrans
Copy link
Member

attachFromPath also doesn't store the attachment data. I think the problem lies elsewhere, how large are the files you are trying to attach.

@asmafarhat2006
Copy link
Author

asmafarhat2006 commented Oct 2, 2023 via email

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

No branches or pull requests

2 participants