Download the PHP package fyre/mail without Composer
On this page you can find all versions of the php package fyre/mail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package mail
FyreMail
FyreMail is a free, open-source email library for PHP.
Table Of Contents
- Installation
- Methods
- Mailers
- Sendmail
- SMTP
- Emails
Installation
Using Composer
In PHP:
Methods
Clear
Clear all instances and configs.
Get Config
Get a Mailer config.
$key
is a string representing the Mailer key.
Alternatively, if the $key
argument is omitted an array containing all configurations will be returned.
Get Key
Get the key for a Mailer instance.
$mailer
is a Mailer.
Has Config
Check if a Mailer config exists.
$key
is a string representing the Mailer key, and will default toMail::DEFAULT
.
Is Loaded
Check if a Mailer instance is loaded.
$key
is a string representing the Mailer key, and will default toMail::DEFAULT
.
Load
Load a Mailer.
$options
is an array containing configuration options.
Set Config
Set the Mailer config.
$key
is a string representing the Mailer key.$options
is an array containing configuration options.
Alternatively, a single array can be provided containing key/value of configuration options.
Unload
Unload a Mailer.
$key
is a string representing the Mailer key, and will default toMail::DEFAULT
.
Use
Load a shared Mailer instance.
$key
is a string representing the Mailer key, and will default toMail::DEFAULT
.
Mailers
You can load a specific mailer by specifying the className
option of the $options
variable above.
Custom mailers can be created by extending \Fyre\Mail\Mailer
, ensuring all below methods are implemented.
Create an Email.
Get Charset
Get the mailer character set.
Get Client
Get the client hostname.
Send
Send an Email.
$email
is an Email.
Sendmail
The Sendmail mailer can be loaded using custom configuration.
$key
is a string representing the mailer key.$options
is an array containing configuration options.className
must be set to\Fyre\Mail\Handlers\SendmailMailer
.charset
is a string representing the character set, and will default to "utf-8".client
is a string representing the client hostname.
SMTP
The SMTP mailer can be loaded using custom configuration.
$key
is a string representing the mailer key.$options
is an array containing configuration options.className
must be set to\Fyre\Mail\Handlers\SmtpMailer
.host
is a string representing the SMTP host, and will default to "127.0.0.1".username
is a string representing the SMTP username.password
is a string representing the SMTP password.port
is a number indicating the SMTP port, and will default to 465.auth
is a boolean indicating whether to authenticate, and will default to false.tls
is a boolean indicating whether to use TLS encryption, and will default to false.dsn
is a boolean indicating whether to use delivery status notification, and will default to false.keepAlive
is a boolean indicating whether to use a persistent connection, and will default to false.charset
is a string representing the character set, and will default to "utf-8".client
is a string representing the client hostname.
Emails
Add Attachments
Add attachments.
$attachments
is an array containing the attachments, where the key is the filename and the value is an array of attachment data.file
is a string representing a path to a file.content
is a string representing the file data.mimeType
is a string representing the MIME content type.contentId
is a string representing the content ID.disposition
is a string representing the content disposition.
For each attachment, a file
or content
must be supplied.
If the mimeType
is omitted it will determined automatically from the file data.
If the disposition
is omitted, it will default to "inline" if a contentId
is provided, otherwise "attachment".
Add Bcc
Add a bcc address.
$email
is a string representing the email address.$name
is a string representing the name, and will default to the email address.
Add Cc
Add a cc address.
$email
is a string representing the email address.$name
is a string representing the name, and will default to the email address.
Add Reply To
Add a reply to address.
$email
is a string representing the email address.$name
is a string representing the name, and will default to the email address.
Add To
Add a to address.
$email
is a string representing the email address.$name
is a string representing the name, and will default to the email address.
Get Attachments
Get the attachments.
Get Bcc
Get the bcc addresses.
Get Body HTML
Get the HTML body string.
Get Body Text
Get the text body string.
Get Boundary
Get the boundary.
Get Cc
Get the cc addresses.
Get Charset
Get the character set.
Get Format
Get the email format.
Get From
Get the from addresses.
Get Headers
Get the additional headers.
Get Message ID
Get the message ID.
Get Priority
Get the priority.
Get Read Receipt
Get the read recipient addresses.
Get Recipients
Get the recipient addresses.
Get Reply To
Get the reply to addresses.
Get Return Path
Get the return path addresses.
Get Sender
Get the sender addresses.
Get Subject
Get the subject.
Get To
Get the to addresses.
Send
Send the email.
Set Attachments
Set the attachments.
$attachments
is an array containing the attachments, where the key is the filename and the value is an array of attachment data.file
is a string representing a path to a file.content
is a string representing the file data.mimeType
is a string representing the MIME content type.contentId
is a string representing the content ID.disposition
is a string representing the content disposition.
For each attachment, a file
or content
must be supplied.
If the mimeType
is omitted it will determined automatically from the file data.
If the disposition
is omitted, it will default to "inline" if a contentId
is provided, otherwise "attachment".
Set Bcc
Set the bcc addresses.
$emails
is an array containing the email addresses, or key-value pairs of email addresses and names.
Set Body Html
Set the body HTML.
$html
is a string representing the body HTML.
Set Body Text
Set the body text.
$text
is a string representing the body text.
Set Cc
Set the cc addresses.
$emails
is an array containing the email addresses, or key-value pairs of email addresses and names.
Set Charset
Set the character set.
$charset
is a string representing the character set.
Set Format
Set the email format.
$format
is a string representing the email format, and must be one of either "html", "text", or "both".
Set From
Set the from address.
$email
is a string representing the email address.$name
is a string representing the name, and will default to the email address.
Set Headers
Set additional headers.
$headers
is an array containing additional headers.
Set Priority
Set the priority.
Set Read Receipt
Set the read recipient address.
$email
is a string representing the email address.$name
is a string representing the name, and will default to the email address.
Set Reply To
Set the reply to addresses.
$emails
is an array containing the email addresses, or key-value pairs of email addresses and names.
Set Return Path
Set the return path address.
$email
is a string representing the email address.$name
is a string representing the name, and will default to the email address.
Set Sender
Set the sender address.
$email
is a string representing the email address.$name
is a string representing the name, and will default to the email address.
Set Subject
Set the subject.
$subject
is a string representing the subject.
Set To
Set the to addresses.
$emails
is an array containing the email addresses, or key-value pairs of email addresses and names.