Download the PHP package cosmira/envelope without Composer
On this page you can find all versions of the php package cosmira/envelope. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cosmira/envelope
More information about cosmira/envelope
Files in cosmira/envelope
Package envelope
Short Description An elegant PHP library for parsing and extracting structured email contents, including attachments and metadata.
License MIT
Informations about the package envelope
cosmira/envelope
Introduction
An elegant PHP library for parsing and extracting structured email contents, including attachments, headers, and metadata. Built on top of the powerful ZBateson\MailMimeParser package, it offers a clean and intuitive API that simplifies working with email data.
Installation
You can install the package via Composer:
Usage
To use the Envelope class, instantiate it with raw email content.
API Reference
from()
Get the sender’s email address.
fromName()
Get the sender’s display name.
to()
Get the primary recipients as an array of email => name pairs.
cc()
Get the CC recipients as an array of email => name pairs.
bcc()
Get the BCC recipients as an array of email => name pairs.
subject()
Get the subject line of the email.
date()
Get the date the email was sent as a DateTime object.
text()
Get the plain text content of the email.
html()
Get the HTML content of the email.
attachments()
Get all attachments as an array, with each item containing name, mime, and content.
All versions of envelope with dependencies
illuminate/collections Version ^11.0 || ^12.0
zbateson/mail-mime-parser Version ^3.0.3