Download the PHP package gavroche/sitesearch without Composer
On this page you can find all versions of the php package gavroche/sitesearch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package sitesearch
Send email across all platforms using one interface.
Table Of Content
- Requirements
- Installation
- Providers
- AmazonSES
- Mailgun
- Mailjet
- Mandrill
- Postmark
- Sendgrid
- SendinBlue
- SMTP
- Gmail
- Email
- To
- From
- CC
- BCC
- Reply to
- Subject
- Text Body
- HTML Body
- Attachments
- Mass Mailings
- Factory
- Exceptions
- Logging
- License
Requirements
This library uses PHP 5.6 and greater version.
Installation
It is recommended that you install the Omnimail library through composer. To do so, run the Composer command to install the latest stable version of Omnimail library.
Providers
AmazonSES
Installation
To use the AmazonSES mailer class, you will need to install the daniel-zahariev/php-aws-ses
library using composer.
Usage
Mailgun
Installation
To use the Mailgun mailer class, you will need to install the mailgun/mailgun-php
library using composer. You do also
need to install a HTTP client that sends messages. You can use any client that provided the virtual package
php-http/client-implementation
Usage
Mailjet
Installation
To use the Mailjet mailer class, you will need to install the mailjet/mailjet-apiv3-php
library using composer.
Usage
Mandrill
Installation
To use the Mandrill mailer class, you will need to install the mandrill/mandrill
library using composer.
Usage
Postmark
Installation
To use the Postmark mailer class, you will need to install the wildbit/postmark-php
library using composer.
Usage
Sendgrid
Installation
To use the Sendgrid mailer class, you will need to install the sendgrid/sendgrid
library using composer.
Usage
SendinBlue
Installation
To use the SendinBlue mailer class, you will need to install the mailin-api/mailin-api-php
library using composer.
Usage
SMTP
Installation
To use the SMTP mailer class, you will need to install the phpmailer/phpmailer
library using composer.
Usage
Gmail
Installation
To use the Gmail mailer class, you will need to install the phpmailer/phpmailer
library using composer.
Usage
An Email
object implements the EmailInterface
inteface. You can create your own Email
class and send it to any
mailer if it implements the EmailInterface
inteface.
To
The To
property of the email is for defining the recipients of the email. You can set multiple recipients.
From
The From
property of the email is for defining the mailer of the email.
CC
Like the To
property, the CC
property can have multiple recipients.
BCC
Like the To
property, the BCC
property can have multiple recipients.
Reply To
The Reply To
property of the email is for defining the email that should receive responses.
Subject
The Subject
property of the email is for defining the subject of the email.
Text Body
The Text Body
property of the email is for defining the text body of the email.
HTML Body
The HTML Body
property of the email is for defining the HTML body of the email.
Attachments
The Attachments
property of the email is for joining attachments to the email.
Example using string as content
Example using file path as content
Inline attachments
Factory
Alternatively, you can use the factory method to create a mailer. Consider the following example to create a AmazonSES mailer:
Mass Mailings
The mass mailing component is for interacting with mass mailing providers. Currently the code focusses on data retrieval, but in future it should also define creating and sending mass mailings.
There are 2 functions currently described for the Mass mailings interface getMailings
and getRecipients
.
getMailings
getMailings
Exceptions
Failures to send emails will throw exceptions.
Exceptions
- Omnimail\Exception\Exception
- Omnimail\Exception\EmailDeliveryException
- Omnimail\Exception\InvalidRequestException
- Omnimail\Exception\UnauthorizedException
- Omnimail\Exception\MailerNotFoundException
To catch all exception, consider the following.
To catch specific exceptions, consider the following.
Logging
All mailers constructors take a PSR-3 compatible logger.
Email sent (including the email) are logged at INFO level. Errors (including the email) are reported at the ERROR level.
Example using Monolog
License
Omnimail is licensed under The MIT License (MIT).
All versions of sitesearch with dependencies
ext-json Version *
paragonie/random_compat Version ^2.0
php-http/httplug Version ^1.1
psr/log Version ^1.1