Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Zend Mime Laravel Package

zendframework/zend-mime

Zend\Mime is a PHP library for creating and parsing MIME messages. Build multipart emails, manage MIME parts, boundaries, headers, and content types/encodings, and handle attachments reliably—useful for mail composition and transport integration.

View on GitHub
Deep Wiki
Context7

Introduction

Zend\Mime\Mime is a support class for handling multipart MIME messages; zend-mail relies on it for both parsing and creating multipart messages. Zend\Mime\Message can also be consumed by applications requiring general MIME support.

Static Methods and Constants

Zend\Mime\Mime provides a set of static helper methods to work with MIME:

  • Zend\Mime\Mime::isPrintable(): Returns TRUE if the given string contains no unprintable characters, FALSE otherwise.
  • Zend\Mime\Mime::encode(): Encodes a string with the specified encoding.
  • Zend\Mime\Mime::encodeBase64(): Encodes a string into base64 encoding.
  • Zend\Mime\Mime::encodeQuotedPrintable(): Encodes a string with the quoted-printable mechanism.
  • Zend\Mime\Mime::encodeBase64Header(): Encodes a string into base64 encoding for Mail Headers.
  • Zend\Mime\Mime::encodeQuotedPrintableHeader(): Encodes a string with the quoted-printable mechanism for Mail Headers.
  • Zend\Mime\Mime::mimeDetectCharset(): detects if a string is encoded as ASCII, Base64, or quoted-printable.

Zend\Mime\Mime defines a set of constants commonly used with MIME messages:

  • Zend\Mime\Mime::TYPE_OCTETSTREAM: 'application/octet-stream'
  • Zend\Mime\Mime::TYPE_TEXT: 'text/plain'
  • Zend\Mime\Mime::TYPE_HTML: 'text/html'
  • Zend\Mime\Mime::ENCODING_7BIT: '7bit'
  • Zend\Mime\Mime::ENCODING_8BIT: '8bit'
  • Zend\Mime\Mime::ENCODING_QUOTEDPRINTABLE: 'quoted-printable'
  • Zend\Mime\Mime::ENCODING_BASE64: 'base64'
  • Zend\Mime\Mime::DISPOSITION_ATTACHMENT: 'attachment'
  • Zend\Mime\Mime::DISPOSITION_INLINE: 'inline'
  • Zend\Mime\Mime::MULTIPART_ALTERNATIVE: 'multipart/alternative'
  • Zend\Mime\Mime::MULTIPART_MIXED: 'multipart/mixed'
  • Zend\Mime\Mime::MULTIPART_RELATED: 'multipart/related'

Instantiating Zend\Mime

When instantiating a Zend\Mime\Mime object, a MIME boundary is stored that is used for all instance calls. If the constructor is called with a string parameter, this value is used as the MIME boundary; if not, a random MIME boundary is generated.

A Zend\Mime\Mime object has the following methods:

  • boundary(): Returns the MIME boundary string.
  • boundaryLine(): Returns the complete MIME boundary line.
  • mimeEnd(): Returns the complete MIME end boundary line.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4