Download the PHP package vasim-seta/codeigniter-imap without Composer

On this page you can find all versions of the php package vasim-seta/codeigniter-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 codeigniter-imap

IMAP Library for CodeIgniter

[![Latest Version on Packagist][ico-version]][link-packagist] ![Software License][ico-license] [![Build Status][ico-travis]][link-travis] [![Total Downloads][ico-downloads]][link-downloads]

Description

CodeIgniter IMAP is an easy way to integrate the native php imap library into your CodeIgniter app.

Note: this library is forked from webklex/laravel-imap which was imap library for laravel, but i need to use it in CodeIgniter and without few changes in the library i can't use it in CodeIgniter. So, I have copied it and changed it as needed. but then i got idea to publish it because there maybe lots of people who wants to use that laravel library in CodeIgniter without doing any changes. Also i have changed things which i have used and needed, there might be issue or error in other things, there will be few trash files and methods of/for laravel as well. If you got any issue then please feel free to report that or you can fork this and do it your self. I have also tried to use webklex/php-imap but i was unable to use it because of few errors and i didn't have much time to figure that out. I have never created any library and i don't know about licencing much more, so please let me know if any issue regarding licencing or anything else then i will remove it from here.

Table of Contents

Installation

1) Install the php-imap library if it isn't already installed:

You might also want to check phpinfo() if the extension is enabled.

2) Now install the CodeIgniter IMAP package by running the following command:

Configuration

when there is no setting define while calling IMAP/Client then it will use these default settings, you might want to add the following to your application/config/config.php file.

The following encryption methods are supported:

Detailed [application/config/config.php] configuration:

Usage

This 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.

There is an experimental function available to get a Folder instance by name. For an easier access please take a look at the new config option imap.options.delimiter however the getFolder method takes three options: the required (string) $folder_name and two optional variables. An integer $attributes which seems to be sometimes 32 or 64 (I honestly have no clue what this number does, so feel free to enlighten me and anyone else) and a delimiter which if it isn't set will use the default option configured inside the config/imap.php file.

Search for specific emails:

Available search criteria:

Further information:

Get a specific message by uid (Please note that the uid is not unique and can change):

Flag or "unflag" a message:

Save message attachments:

Fetch messages without body fetching (decrease load):

Fetch messages without body and attachment fetching (decrease load):

Find the folder containing a message:

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.
getFolder string $folder_name, int $attributes = 32, int or null $delimiter Folder Get a Folder instance by name
getFolders bool $hierarchical, string or null $parent_folder FolderCollection Get folders list. If hierarchical order is set to true, it will make a tree of folders, otherwise it will return flat array.
openFolder Folder $folder, integer $attempts Open a given folder.
createFolder string $name boolean Create a new folder.
renameFolder string $old_name, string $new_name boolean Rename a folder.
deleteFolder string $name boolean Delete a folder.
getMessages Folder $folder, string $criteria, bool $fetch_body, bool $fetch_attachment MessageCollection Get messages from folder.
getUnseenMessages Folder $folder, string $criteria, bool $fetch_body, bool $fetch_attachment MessageCollection Get Unseen messages from folder.
searchMessages array $where, Folder $folder, $fetch_options, bool $fetch_body, string $charset, bool $fetch_attachment MessageCollection Get specific messages from a given 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
parseBody Message Parse the Message body
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
getContainingFolder Folder or null $folder null Folder Get the folder containing the message
moveToFolder string $mailbox, int $options Move the Message into an other Folder
setFlag string or array $flag boolean Set one or many flags
unsetFlag string or array $flag boolean Unset one or many flags
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 AttachmentCollection Get all message attachments
hasAttachments boolean Checks if there are any attachments present
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
getHeaderInfo object Get the current header_info object
getHeader string Get the current raw header
getMessageId integer Get the current message ID
getMessageNo integer Get the current message number
getSubject string Get the current subject
getReferences mixed Get any potentially present references
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
getInReplyTo string Get the current In-Reply-To
getSender array Get the current sender information
getBodies mixed Get the current bodies
getRawBody mixed Get the current raw message body
is boolean Does this message match another one?

Folder::class

Method Arguments Return Description
hasChildren bool Determine if folder has children.
setChildren array $children self Set children.
getMessage integer $uid, integer or null $msglist, int or null fetch_options, bool $fetch_body, bool $fetch_attachment Message Get a specific message from folder.
getMessages string $criteria, bool $fetch_body, bool $fetch_attachment MessageCollection Get messages from folder.
getUnseenMessages string $criteria, bool $fetch_body, bool $fetch_attachment MessageCollection Get Unseen messages from folder.
searchMessages array $where, $fetch_options, bool $fetch_body, string $charset, bool $fetch_attachment MessageCollection Get specific messages from a given folder.
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
getClient Client Get the current Client instance

Attachment::class

Method Arguments Return Description
getContent string or null Get attachment content
getMimeType string or null Get attachment mime type
getExtension string or null Get a guessed attachment extension
getName string or null Get attachment name
getType string or null Get attachment type
getDisposition string or null Get attachment disposition
getContentType string or null Get attachment content type
getImgSrc string or null Get attachment image source as base64 encoded data url
save string $path, string $filename boolean Save the attachment content to your filesystem

MessageCollection::class

Extends Illuminate\Support\Collection::class

Method Arguments Return Description
paginate int $perPage = 15, $page = null, $pageName = 'page' LengthAwarePaginator Paginate the current collection.

AttachmentCollection::class

Extends Illuminate\Support\Collection::class

Method Arguments Return Description
paginate int $perPage = 15, $page = null, $pageName = 'page' LengthAwarePaginator Paginate the current collection.

FolderCollection::class

Extends Illuminate\Support\Collection::class

Method Arguments Return Description
paginate int $perPage = 15, $page = null, $pageName = 'page' LengthAwarePaginator Paginate the current collection.

Known issues

Milestones & upcoming features

Change log

Please see CHANGELOG for more information what has changed recently.

Security

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

Credits

Supporters

License

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


All versions of codeigniter-imap with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
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 vasim-seta/codeigniter-imap contains the following files

Loading the files please wait ....