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

getAttachments() problem when mixin inline and attachment #281

Closed
Daredzik opened this issue Jan 15, 2018 · 1 comment
Closed

getAttachments() problem when mixin inline and attachment #281

Daredzik opened this issue Jan 15, 2018 · 1 comment
Labels

Comments

@Daredzik
Copy link
Contributor

PHP version: 7.2
ddeboer/imap: newest (from master)

I have problem with attachments marked as inline and attachment (in one email).
If i send email from Evolution, one image as inline and other image as attachments, i can get both of them.
But if i send this same email with images (one inline and second as attachment) from Thunderbird or outlook i can only get attachment marks as attachment.

I think is a boundry problem.

Provided eml:
This message was sended from Thunderbird, and only attachment mark as attachment can be download by getAttachments() method.

Date: Mon, 15 Jan 2018 10:54:09 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.5.0
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="------------85793CE1578A77318D5A90A6"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------85793CE1578A77318D5A90A6
Content-Type: multipart/alternative;
 boundary="------------32D598A7FC3F8A8E228998B0"


--------------32D598A7FC3F8A8E228998B0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit


------------------------------------------------------------------------




--------------32D598A7FC3F8A8E228998B0
Content-Type: multipart/related;
 boundary="------------261DC39B47CFCDB73BCE3C18"


--------------261DC39B47CFCDB73BCE3C18
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <div class="moz-signature">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <title></title>
      Â <img src="cid:[email protected]" alt="">
      <hr>
      <table width="20" cellspacing="2" cellpadding="2" height="31">
        <tbody>
          <tr>
            <td><br>
            </td>
            <td valign="middle"><br>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>

--------------261DC39B47CFCDB73BCE3C18
Content-Type: image/png;
 name="mleokdgdlgkkecep.png"
Content-Transfer-Encoding: base64
Content-ID: <[email protected]>
Content-Disposition: inline;
 filename="mleokdgdlgkkecep.png"

iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAACklE
QVR4nGNiAAAABgADNjd8qAAAAABJRU5ErkJggg==
--------------261DC39B47CFCDB73BCE3C18--

--------------32D598A7FC3F8A8E228998B0--

--------------85793CE1578A77318D5A90A6
Content-Type: image/png;
 name="FF4D00-1.png"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="FF4D00-1.png"

iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAACklE
QVR4nGNiAAAABgADNjd8qAAAAABJRU5ErkJggg==
--------------85793CE1578A77318D5A90A6--

And this is emal from Evolution
eml:

Content-Type: multipart/mixed; boundary="=-p8Zd93B6hfubPGxlJZMO"
X-Mailer: Evolution 3.22.6-1+deb9u1 
Mime-Version: 1.0


--=-p8Zd93B6hfubPGxlJZMO
Content-Type: multipart/related; type="multipart/alternative";
	boundary="=-vEq+WjbKgB+XBt2SSuuz"


--=-vEq+WjbKgB+XBt2SSuuz
Content-Type: multipart/alternative; boundary="=-cbF9AsgX59ZITxG0A7s2"


--=-cbF9AsgX59ZITxG0A7s2
Content-Type: text/plain
Content-Transfer-Encoding: 7bit



--=-cbF9AsgX59ZITxG0A7s2
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit

<html><head></head><body><div><img src="cid:[email protected]"><br></div><div><span></span></div></body></html>
--=-cbF9AsgX59ZITxG0A7s2--

--=-vEq+WjbKgB+XBt2SSuuz
Content-ID: <[email protected]>
Content-Type: image/png; name="FF4D00-0.8.png"
Content-Disposition: inline; filename="FF4D00-0.8.png"
Content-Transfer-Encoding: base64

iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAAAXRSTlPM
0jRW/QAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=


--=-vEq+WjbKgB+XBt2SSuuz--

--=-p8Zd93B6hfubPGxlJZMO
Content-Type: image/png; name="FF4D00-0.8.png"
Content-Disposition: attachment; filename="FF4D00-0.8.png"
Content-Transfer-Encoding: base64

iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEX/TQBcNTh/AAAAAXRSTlPM
0jRW/QAAAApJREFUeJxjYgAAAAYAAzY3fKgAAAAASUVORK5CYII=


--=-p8Zd93B6hfubPGxlJZMO--

In this case both of image (inline and attachment) can be access via getAttachments() method

@Slamdunk
Copy link
Collaborator

Released in 1.2.0

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

No branches or pull requests

2 participants