2017 © Pedro Peláez
 

symfony-bundle imap-bundle

Symfony2 service wrapper for PhpImap

image

caponica/imap-bundle

Symfony2 service wrapper for PhpImap

  • Saturday, November 5, 2016
  • by caponica
  • Repository
  • 1 Watchers
  • 0 Stars
  • 170 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

Caponica Imap Bundle

PhpImap integration via a Symfony service., (*1)

Installation

Install using composer by adding the following in the require section of your composer.json file:, (*2)

``` json "require": { ... "caponica/imap-bundle": "dev-master" },, (*3)


Register the bundle in your kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Caponica\ImapBundle\CaponicaImapBundle(), ); }

Configuration

The bundle does not add a service to your project by default. To add the service, you will need to define the parameters and then the service itself., (*4)

``` yaml, (*5)

app/config/parameters.yml

your_imap_config: imapPath: '{imap.gmail.com:993/imap/ssl}INBOX' username: you@gmail.com password: your_password directory: /path/to/folder, (*6)


``` yaml # services.yml caponica_imap_box: class: Caponica\ImapBundle\Service\CaponicaImap calls: - [ setConfig, [ %your_imap_config_box% ]]

Usage

To access the service, just reference it by the service name you defined above. E.g., from a controller:, (*7)

$caponicaImap = $this->container->get('caponica_imap_box');
$mailbox = $this->caponicaImap->getImapMailbox();
$mailsIds = $mailbox->sortMails(SORTDATE);

The Versions

05/11 2016

dev-master

9999999-dev

Symfony2 service wrapper for PhpImap

  Sources   Download

MIT

The Requires

 

The Development Requires

email symfony imap