Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Imap Bundle Laravel Package

caponica/imap-bundle

View on GitHub
Deep Wiki
Context7

Caponica Imap Bundle

PhpImap integration via a Symfony service.

Installation

Install using composer by adding the following in the require section of your composer.json file:

    "require": {
        ...
        "caponica/imap-bundle": "dev-master"
    },

Register the bundle in your kernel:

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

# 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
# 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:

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

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony
spatie/flare-daemon-runtime