Download the PHP package sfaut/zimbra without Composer

On this page you can find all versions of the php package sfaut/zimbra. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zimbra

sfaut\Zimbra

Read and send simply Zimbra messages. Attachments are managed.

Based on Zimbra 8 SOAP API.

Introduction

Composer installation

You can add sfaut\Zimbra package to your project with Composer :

And include it as usual with autoloader :

Raw installation

sfaut\Zimbra is an unique class with no dependancies, so you can download /src/Zimbra.php and include it in your script like any others scripts.

Object structure

Here is a search response structure within an array of messages. A message is an anonymous object.

Connection

Static method Zimbra::authenticate() creates a new sfaut\Zimbra instance and immediately connects to Zimbra server. An exception is raised on failure.

To shorten following examples, use, require and others out of scope parts will be snipped. Assume sfaut\Zimbra is instanciate in $zimbra.

Error management

sfaut\Zimbra is exceptions-oriented. So, you should encapsulate statements within try / catch / finally blocks.

To shorten following examples, exceptions management will be snipped.

Get mailbox messages

All messages listing are, in reality, search result. Search is performed with Zimbra::search() method and Zimbra client search capacities. Zimbra search tips have been archived on this gist.

Send a message

Send a message to multiple recipients

You can use arrays to specify multiple e-mail addresses :

Send a message with attachment

4th Zimbra::send() parameter is an array of attachments.

Basically, an attachment is an anonymous object (or an array) containing 2 properties :

Possible type values are :

Attach a locale file to a message :

You can also attach multiple files in a row :

And you can mix different types of data sources :

Eeach attachment is uploaded while sending message. That can be unnecessarily resource-consuming if you send multiple messages with the same attachments. To save resources, you can first upload files with Zimbra::upload(), then attach them to messages.

Attachments

Message attachments are specified in array $message->attachments.

Attachments can be uploaded with Zimbra::upload() and downloaded with Zimbra::download().

Each attachment is an anonymous object having the following structure :

Attachments retrieving

All attachments of a message are retrieved in an array returned by Zimbra::download(). Attachments are downloaded in temporary files. These temporary files are automatically deleted at script end. Each attachment is an anonymous object containing, among other things, a stream property pointing to the temporary file, and ready to read and write.

You can filter attachments to retrieve with a closure accepting an attachment object as parameter (returning true by default).

Real-life use case

Mass download attachments

PHP and sfaut\Zimbra allows you to do that easily :)

That's all Folks! 🐰


All versions of zimbra with dependencies

PHP Build Version
Package Version
Requires php Version >=7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sfaut/zimbra contains the following files

Loading the files please wait ....