Download the PHP package macromindonline/laravel-imap without Composer

On this page you can find all versions of the php package macromindonline/laravel-imap. 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 laravel-imap

IMAP Library for Laravel

Latest Version on Packagist Build Status Total Downloads Gittip

Install

Via Composer

Setup

Add the service provider to the providers array in config/app.php.

If you are planning to use a single account, you might want to add the following to your .env file.

The following encryption methods are supported:

Publishing

You can publish everything at once

Access the IMAP Client by its Facade \Webklex\IMAP\Facades\Client::class. Therefor you might want to add an alias to the aliases array within the config/imap.php file.

Usage

This library is designed to handle the native php imap functions more easily and to be able to integrate this package within your current laravel installation.

Here is a basic example, which will echo out all Mails within all imap folders and will move every message into INBOX.read. Please be aware that this should not ben tested in real live but it gives an impression on how things work.

If you use the Facade \Webklex\IMAP\Facades\Client::class please select an account first:

You can define your accounts inside the config/imap.php file:

Documentation

Client::class

Method Arguments Return Description
setConfig array $config self Set the Client configuration. Take a look at config/imap.php for more inspiration.
getConnection resource $connection resource Get the current imap resource
setReadOnly bool $readOnly self Set read only property and reconnect if it's necessary.
setFetchOption integer $option self Fail proof setter for $fetch_option
isReadOnly bool Determine if connection is in read only mode.
isConnected bool Determine if connection was established.
checkConnection Determine if connection was established and connect if not.
connect int $attempts Connect to server.
disconnect Disconnect from server.
getFolders bool $hierarchical, string or null $parent_folder array Get folders list. If hierarchical order is set to true, it will make a tree of folders, otherwise it will return flat array.
openFolder \Webklex\IMAP\Folder $folder Open a given folder.
createFolder string $name Create a new folder.
getMessages \Webklex\IMAP\Folder $folder, string $criteria array Get messages from folder.
getUnseenMessages \Webklex\IMAP\Folder $folder, string $criteria array Get Unseen messages from folder.
getQuota array Retrieve the quota level settings, and usage statics per mailbox
getQuotaRoot string $quota_root array Retrieve the quota settings per user
countMessages int Gets the number of messages in the current mailbox
countRecentMessages int Gets the number of recent messages in current mailbox
getAlerts array Returns all IMAP alert messages that have occurred
getErrors array Returns all of the IMAP errors that have occurred
getLastError string Gets the last IMAP error that occurred during this page request
expunge bool Delete all messages marked for deletion
checkCurrentMailbox object Check current mailbox

Message::class

Method Arguments Return Description
delete Delete the current Message
restore Restore a deleted Message
copy string $mailbox, int $options Copy the current Messages to a mailbox
move string $mailbox, int $options Move the current Messages to a mailbox
moveToFolder string $mailbox Move the Message into an other Folder
hasTextBody Check if the Message has a text body
hasHTMLBody Check if the Message has a html body
getTextBody string Get the Message text body
getHTMLBody string Get the Message html body
getAttachments collection Get all message attachments
getClient Client Get the current Client instance
getUid string Get the current UID
getFetchOptions string Get the current fetch option
getMsglist integer Get the current message list
getMessageId integer Get the current message ID
getMessageNo integer Get the current message number
getSubject string Get the current subject
getDate Carbon Get the current date object
getFrom array Get the current from information
getTo array Get the current to information
getCc array Get the current cc information
getBcc array Get the current bcc information
getReplyTo array Get the current reply to information
getSender array Get the current sender information
getBodies mixed Get the current bodies

Folder::class

Method Arguments Return Description
hasChildren bool Determine if folder has children.
setChildren array $children self Set children.
getMessages string $criteria array Get messages.
delete Delete the current Mailbox
move string $mailbox Move or Rename the current Mailbox
getStatus integer $options object Returns status information on a mailbox
appendMessage string $message, string $options, string $internal_date bool Append a string message to the current mailbox

Known issues

Error Solution
Kerberos error: No credentials cache file found (try running kinit) (...) Uncomment "DISABLE_AUTHENTICATOR" inside config/imap.php
imap_fetchbody() expects parameter 4 to be long, string given (...) Make sure that imap.options.fetch is a valid integer
Use of undefined constant FT_UID - assumed 'FT_UID' (...) Please take a look at #14 #30

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-imap with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
laravel/framework Version >=5.0.0
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 macromindonline/laravel-imap contains the following files

Loading the files please wait ....