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

Error with attachment charset #226

Closed
it-can opened this issue Oct 5, 2017 · 3 comments
Closed

Error with attachment charset #226

it-can opened this issue Oct 5, 2017 · 3 comments
Assignees
Labels

Comments

@it-can
Copy link

it-can commented Oct 5, 2017

Getting this error after upgrading to version 1

Return value of Ddeboer\Imap\Message\AbstractPart::getCharset() must be of the type string, null returned 
    vendor/ddeboer/imap/src/Message/AbstractPart.php:175 Ddeboer\Imap\Message\AbstractPart::getCharset
    vendor/ddeboer/imap/src/Message/AbstractPart.php:280 Ddeboer\Imap\Message\AbstractPart::getDecodedContent
@Slamdunk
Copy link
Collaborator

Slamdunk commented Oct 5, 2017

@it-can at the time of writing we are unable to reproduce a null charset. Still a fix can be pushed with related test.

A bugfix version 1.0.1 is tagged: can you update the library and give us a feedback? Thanks.

@it-can
Copy link
Author

it-can commented Oct 5, 2017

Thanks, will test!

@it-can
Copy link
Author

it-can commented Oct 5, 2017

@Slamdunk These are my email headers btw

------=_NextPart_000_01B0_01D33D5D.1AB50480
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Description: body


------=_NextPart_000_01B0_01D33D5D.1AB50480
Content-Type: text/xml; name="test.xml"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.xml"

------=_NextPart_000_01B0_01D33D5D.1AB50480
Content-Type: application/octet-stream; name="test.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.pdf"

When saving the attachment, it seems the encoding is screwed of the XML file... The PDF seems correct...

<?xml version="1.0" encoding="utf-8"?>

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