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

Operation request: MIME rfc2047 #538

Open
troyheady2 opened this issue Apr 9, 2019 · 1 comment
Open

Operation request: MIME rfc2047 #538

troyheady2 opened this issue Apr 9, 2019 · 1 comment

Comments

@troyheady2
Copy link

Summary

can you please add email MIME header decoding. see the following for info and examples
https://www.ietf.org/rfc/rfc2047.txt
http://dogmamix.com/MimeHeadersDecoder/

Example

input:
From: =?US-ASCII?Q?Keith_Moore?= [email protected]
To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= [email protected]
CC: =?ISO-8859-1?Q?Andr=E9?= Pirard [email protected]
Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=
=?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=

output:
From: Keith Moore [email protected]
To: Keld Jørn Simonsen [email protected]
CC: André Pirard [email protected]
Subject: If you can read this you understand the example.

@GlassGruber
Copy link

This is a recipe to obtain a very close result requested by OP, but for some reason the operation From Quoted Printable is not converting underscores characters.

[
  { "op": "Fork",
    "args": ["\\n", "\\n", false] },
  { "op": "Comment",
    "args": ["Extract and decode Base64 string"] },
  { "op": "Subsection",
    "args": ["\\?b\\?(.*)\\?=", false, false, false] },
  { "op": "From Base64",
    "args": ["A-Za-z0-9+/=", false, false] },
  { "op": "Merge",
    "args": [true] },
  { "op": "Comment",
    "args": ["Extract and decode quoted-printable string"] },
  { "op": "Subsection",
    "args": ["\\?q\\?(.*)\\?=", false, true, false] },
  { "op": "From Quoted Printable",
    "args": [] },
  { "op": "Merge",
    "args": [true] },
  { "op": "Find / Replace",
    "args": [{ "option": "Regex", "string": "=.+?[qbQB]\\?|\\?=" }, "", true, true, false, false] }
]

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

No branches or pull requests

3 participants