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

Mime type improvements #17

Merged
merged 3 commits into from Jun 7, 2019
Merged

Mime type improvements #17

merged 3 commits into from Jun 7, 2019

Conversation

chriswthomson
Copy link
Collaborator

Further investigation of getting mime type:

  • removed canAttach (not useful)
  • created a function the tries mime_content_type() and finfo_open() before identifying mime based on extension.

based on https://www.php.net/manual/en/function.mime-content-type.php#87856 and https://gist.github.com/Erutan409/8e774dfb2b343fe78b14#file-mimetype-php

Also, a WireException is now thrown if an attachment has been added but curl_file_create() doesn't exist.

Version update.

Further investigation of getting mime type:
- removed canAttach (not useful)
- created a function the tries mime_content_type() and finfo_open() before identifying mime based on extension.

based on https://www.php.net/manual/en/function.mime-content-type.php#87856 and https://gist.github.com/Erutan409/8e774dfb2b343fe78b14#file-mimetype-php

Also, a WireException is now thrown if an attachment has been added but curl_file_create() doesn't exist.
Addition of attachment() and replyTo() methods to throw a WireException on incompatible PW versions. Version update.
@chriswthomson chriswthomson merged commit 78e9db1 into master Jun 7, 2019
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.

None yet

1 participant