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

Any way to now break the encoders/parsers passing a message part? #938

Closed
ciaoben opened this issue Nov 30, 2015 · 1 comment
Closed

Any way to now break the encoders/parsers passing a message part? #938

ciaoben opened this issue Nov 30, 2015 · 1 comment

Comments

@ciaoben
Copy link

ciaoben commented Nov 30, 2015

I would like if there is any way to use this gem and having the benefits of its management of decoders, passing a single part of a message retrieved with a fetch with:
BODY.PEEK[1]

I new to parse emails without their attachments parts, for performance reason, so once I have understood which parts to parse, I try to pass to

imap.uid_fetch uid, ['BODY.PEEK[1] BODY.PEEK[1.MIME]']
part = msg.first.attr['BODY[1]']
Mail.new part

But It seems to now fully undertand the format of the email and nothing like html_part or text_part seems to work.

Is there a "proper" way to do this?

@jeremy
Copy link
Collaborator

jeremy commented May 17, 2017

Should "just work" so long as you pass a rfc822 text from the IMAP query.

@jeremy jeremy closed this as completed May 17, 2017
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