Giter Club home page Giter Club logo

Comments (4)

phith0n avatar phith0n commented on May 31, 2024 1

Thanks, well done. I'll close the issue.

from mail-parser.

fedelemantuano avatar fedelemantuano commented on May 31, 2024

Hi, @phith0n,
can you have any samples of emails?

from mail-parser.

phith0n avatar phith0n commented on May 31, 2024

If you send a message with an image, you can see it.

I put a sample email in https://pastebin.com/eAi8jvym

from mail-parser.

fedelemantuano avatar fedelemantuano commented on May 31, 2024

I added content-id for attachments. Your example is parsed like this:

{
  "body": "an image:\n\n[image: github-512.png]\n--- mail_boundary ---\n<div dir=\"ltr\">an image:<div><br></div><div><div><img src=\"cid:ii_jj6jjue40\" alt=\"github-512.png\" width=\"512\" height=\"512\"><br></div><br></div></div>",
  "from": [
    [
      "phith0n",
      "[email protected]"
    ]
  ],
  "attachments": [
    {
      "binary": true,
      "mail_content_type": "image/png",
      "payload": "",
      "filename": "github-512.png",
      "content_transfer_encoding": "base64",
      "content-id": "<ii_jj6jjue40>"
    }
  ],
  "has_defects": false,
  "mime-version": "1.0",
  "to_domains": [
    "gmail.com"
  ],
  "to": [
    [
      "phith0n",
      "[email protected]"
    ]
  ],
  "date": "2018-07-04T03:08:14",
  "message-id": "<CALPTonT53BK+C+s7xD=3_kKYMMQJKkzCO52hLkDod4BYb-TMdA@mail.gmail.com>",
  "content-type": "multipart/related; boundary=\"000000000000e03ad8057023bdce\"",
  "subject": "An email example"
}

You can use this function in next release.
Can I close the issue?

from mail-parser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.