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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor