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

multiple levels of multipart parts and has_attachment? #10

Open
daanporon opened this issue Jun 22, 2011 · 0 comments
Open

multiple levels of multipart parts and has_attachment? #10

daanporon opened this issue Jun 22, 2011 · 0 comments

Comments

@daanporon
Copy link

Hi, i'm not sure this is an issue, it's also possible i'm missing something because i'm very new to RoR but i have a question regarding attachments. In attachment.rb you have the has_attachments? method. I was wondering if it's possible this doesn't work when you have a mail with a part which is also a multipart which has attachments in it.

For example you're mail has this content-type and boundry
Content-Type: multipart/alternative; boundary="Apple-Mail=_E8397270-291C-4746-8EB1-D568A0ABA967"

then a bit further in the mail you have this part
--Apple-Mail=_E8397270-291C-4746-8EB1-D568A0ABA967
Content-Type: multipart/mixed;
boundary="Apple-Mail=_DA9B1844-6394-4218-88C6-9A692179991E"

which defines a new multipart with a new boundry for the parts below

Then you'll have this:
--Apple-Mail=_DA9B1844-6394-4218-88C6-9A692179991E
With an attachment underneath it.

Will this work when i ask at the mail has_attachments?, will this recognize the attachment multiple levels deep? Because i don't see any recursive calls in the method has_attachment or am i wrong? The problem is i was debugging redmine, and as far as i could see the problem we where having had something to do with this. I also posted a report at redmine: http://www.redmine.org/issues/8651

Kind regards,
Daan

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

1 participant