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

Fixed error #23 and error with unknown message structure #36

Closed
wants to merge 4 commits into from
Closed

Fixed error #23 and error with unknown message structure #36

wants to merge 4 commits into from

Conversation

thelfensdrfer
Copy link
Contributor

No description provided.

@ddeboer
Copy link
Owner

ddeboer commented Jan 23, 2015

Could you elaborate on what this PR accomplishes?

@thelfensdrfer
Copy link
Contributor Author

Some mails do not provide a vaild message structure type, see https://github.com/thelfensdrfer/imap/commit/ea783c58de50de5f6436033d6b68aa3f312c8db0

When i was creating the pull request, I scanned my hole email account to insert the mail into a database. Without this fix, some emails could not be parsed and the script terminated at this point.

ddeboer added a commit that referenced this pull request Jan 24, 2015
$this->headers = new Message\Headers($headers);
try {
$headers = \imap_header($this->stream, $this->messageNumber);
} catch (\Exception $e) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure imap_header ever throws exceptions. It would be more in the line of PHP to emit some silly warning or notice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am no fan of try/catch but when I added it there was assuredly at least one exception...I think;)

@ddeboer ddeboer closed this in 1d45685 Jan 24, 2015
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

Successfully merging this pull request may close these issues.

2 participants