Laravel IMAP is an easy way to integrate both the native php-imap module and an extended custom imap protocol into your Laravel app.

Overview

IMAP Library for Laravel

Latest release on Packagist Latest prerelease on Packagist Software License Build Status Code quality Total Downloads Hits Discord Snyk

Description

Laravel IMAP is an easy way to integrate both the native php-imap module and an extended custom imap protocol into your Laravel app. This enables your app to not only respond to new emails but also allows it to read and parse existing mails and much more.

Official documentation: php-imap.com/frameworks/laravel

Discord: discord.gg/jCcZWCSq

Table of Contents

Documentations

Installation

This library requires the mbstring and mcrypt php module. Make sure to install or enable them if they arn't available.

sudo apt-get install php*-mbstring php*-mcrypt

Installation via composer:

composer require webklex/laravel-imap

Additional information such as troubleshooting, legacy support and package publishing can be found here: php-imap.com/frameworks/laravel/installation

Basic usage example

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 be tested in real life and is only meant to gives an impression on how things work.

/** @var \Webklex\PHPIMAP\Client $client */
$client = Webklex\IMAP\Facades\Client::account('default');

//Connect to the IMAP Server
$client->connect();

//Get all Mailboxes
/** @var \Webklex\PHPIMAP\Support\FolderCollection $folders */
$folders = $client->getFolders();

//Loop through every Mailbox
/** @var \Webklex\PHPIMAP\Folder $folder */
foreach($folders as $folder){

    //Get all Messages of the current Mailbox $folder
    /** @var \Webklex\PHPIMAP\Support\MessageCollection $messages */
    $messages = $folder->messages()->all()->get();
    
    /** @var \Webklex\PHPIMAP\Message $message */
    foreach($messages as $message){
        echo $message->getSubject().'
'
; echo 'Attachments: '.$message->getAttachments()->count().'
'
; echo $message->getHTMLBody(); //Move the current Message to 'INBOX.read' if($message->move('INBOX.read') == true){ echo 'Message has ben moved'; }else{ echo 'Message could not be moved'; } } }

Known issues

Error Solution
Kerberos error: No credentials cache file found (try running kinit) (...) Uncomment "DISABLE_AUTHENTICATOR" inside and use the legacy-imap protocol config/imap.php

Support

If you encounter any problems or if you find a bug, please don't hesitate to create a new issue. However please be aware that it might take some time to get an answer.

Off topic, rude or abusive issues will be deleted without any notice.

If you need immediate or commercial support, feel free to send me a mail at [email protected].

A little notice

If you write source code in your issue, please consider to format it correctly. This makes it so much nicer to read
and people are more likely to comment and help :)

```php

echo 'your php code...';

```

will turn into:

echo 'your php code...'; 

Features & pull requests

Everyone can contribute to this project. Every pull request will be considered but it can also happen to be declined.
To prevent unnecessary work, please consider to create a feature issue
first, if you're planning to do bigger changes. Of course you can also create a new feature issue if you're just wishing a feature ;)

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

A special thanks to Jetbrains for supporting this project through their open source license program.

Jetbrains

License

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

Comments
  • problem with ->moveToFolder() and multiple moves

    problem with ->moveToFolder() and multiple moves

    ->moveToFolder() works perfectly when moving a single email in a single session. But it fails to move correct emails when moving more than one email per session. Debugging with xdebug I can confirm that the sequence numbers got confused when expunging messages. I find the affirmations at the following link to be correct: http://gabijack.com/moving-and-deleting-messages-with-php-imap/

    May I request a fix?

    bug validated 
    opened by mundanet 24
  • Reading a blank body (text / html) but only from this sender

    Reading a blank body (text / html) but only from this sender

    Hi,

    I really enjoy this plugin and I've used it for 1½ year without problems until now - so I'm thinking there must be a rare bug because it has been working for so long in version 1.2 and now 1.4.

    The problem short: Many (50+) people are writing emails to us everyday without problems but for a specific person then we only get the subject + attachments fetched and both the text & html content is blank / empty.

    So I hope you have some ideas of why this is happening - please tell thanks :)

    Laravel: 5.4 Laravel Imap: 1.4 (latest) - the problem were also in 1.2 because I tried that version too without luck

    Reproducing the problem: I tried but I cannot - so my conclusion is that the problem must exist in the email headers. Because when forwarding the e-mail to myself and back again to the IMAP inbox then the body could be fetched correctly.... I'm so lost here :)

    imap config:

                'host' => 'outlook.office365.com',
                'port' => 993,
                'protocol' => 'imap',
                'encryption' => 'ssl',
                'validate_cert' => true,
    ...
        'options' => [
            'delimiter' => '/',
            'fetch' => FT_PEEK,
            'fetch_body' => true,
            'fetch_attachment' => true,
            'fetch_flags' => true,
            'message_key' => 'id',
            'fetch_order' => 'asc',
            'open' => [
                'DISABLE_AUTHENTICATOR' => ['GSSAPI','PLAIN'],
            ]
        ]
    

    Email headers where the body is blank / empty and only the subject + attachments is fetched successfully. Can you spot any wierd header causing something going wrong ? I can log in to the mailbox on office 365 and see the email (I renamed recipient and sender email):

    Received: from AM6PR03MB3816.eurprd03.prod.outlook.com (2603:10a6:206:14::46)
     by AM6PR03MB3815.eurprd03.prod.outlook.com with HTTPS via
     AM5P190CA0033.EURP190.PROD.OUTLOOK.COM; Tue, 26 Mar 2019 16:59:33 +0000
    Received: from DB8PR03CA0013.eurprd03.prod.outlook.com (2603:10a6:10:be::26)
     by AM6PR03MB3816.eurprd03.prod.outlook.com (2603:10a6:20b:24::15) with
     Microsoft SMTP Server (version=TLS1_2,
     cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.18; Tue, 26 Mar
     2019 16:59:32 +0000
    Received: from VI1EUR04FT035.eop-eur04.prod.protection.outlook.com
     (2a01:111:f400:7e0e::203) by DB8PR03CA0013.outlook.office365.com
     (2603:10a6:10:be::26) with Microsoft SMTP Server (version=TLS1_2,
     cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1730.18 via Frontend
     Transport; Tue, 26 Mar 2019 16:59:31 +0000
    Authentication-Results: spf=none (sender IP is 78.46.72.43)
     smtp.mailfrom=kellertravel.ie; campingvision.com; dkim=none (message not
     signed) header.d=none;campingvision.com; dmarc=none action=none
     header.from=kellertravel.ie;compauth=pass reason=116
    Received-SPF: None (protection.outlook.com: kellertravel.ie does not designate
     permitted sender hosts)
    Received: from mr30.theemaillaundry.net (78.46.72.43) by
     VI1EUR04FT035.mail.protection.outlook.com (10.152.28.160) with Microsoft SMTP
     Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id
     15.20.1750.11 via Frontend Transport; Tue, 26 Mar 2019 16:59:31 +0000
    Received: from localhost (localhost [127.0.0.1])
    	by mr30.theemaillaundry.net (Postfix) with ESMTP id 50DCD241869
    	for <[email protected]>; Tue, 26 Mar 2019 16:59:31 +0000 (GMT)
    X-Amavis-Modified: Mail body modified (using disclaimer) -
    	mr30.theemaillaundry.net
    X-Virus-Scanned: amavisd-new at theemaillaundry.net
    Received: from mr30.theemaillaundry.net ([127.0.0.1])
    	by localhost (mr30.theemaillaundry.net [127.0.0.1]) (amavisd-new, port 10024)
    	with ESMTP id DZotoCQz3rCQ for <[email protected]>;
    	Tue, 26 Mar 2019 16:59:24 +0000 (GMT)
    Received: from kellertravel.ie (unknown [83.71.235.137])
    	by mr30.theemaillaundry.net (Postfix) with ESMTP id 9DF262416F1
    	for <[email protected]>; Tue, 26 Mar 2019 16:59:24 +0000 (GMT)
    Received: from KELLER-DOM-MTA by kellertravel.ie
    	with Novell_GroupWise; Tue, 26 Mar 2019 16:59:24 +0000
    MIME-Version: 1.0
    Date: Tue, 26 Mar 2019 16:59:19 +0000
    References: <[email protected]>
    In-Reply-To: <[email protected]>
    Message-ID: <[email protected]>
    X-Mailer: Groupwise 7.0.3
    From: Sender name here <[email protected]>
    Subject: Re: [Booking ref: AL851209]
    To: Camping Vision <[email protected]>
    Content-Type: multipart/alternative; boundary="____IZPBWUYHBUJDCJJCVTXY____"
    Return-Path: [email protected]
    X-MS-Exchange-Organization-ExpirationStartTime: 26 Mar 2019 16:59:31.6834
     (UTC)
    X-MS-Exchange-Organization-ExpirationStartTimeReason: OriginalSubmit
    X-MS-Exchange-Organization-ExpirationInterval: 2:00:00:00.0000000
    X-MS-Exchange-Organization-ExpirationIntervalReason: OriginalSubmit
    X-MS-Exchange-Organization-Network-Message-Id:
     0963b9be-507e-4da1-65d9-08d6b20c6a92
    X-EOPAttributedMessage: 0
    X-EOPTenantAttributedMessage: d06c4993-a045-45c6-a1d9-c808440ef213:0
    X-MS-Exchange-Organization-MessageDirectionality: Incoming
    X-Forefront-Antispam-Report:
     CIP:78.46.72.43;IPV:NLI;CTRY:DE;EFV:NLI;SFV:NSPM;SFS:(2980300002)(428003)(199004)(189003)(50226002)(8676002)(733005)(16586007)(6666004)(71190400001)(229853002)(356004)(36756003)(486006)(6916009)(33656002)(246002)(81446001)(24386001)(72206003)(1096003)(105586002)(106466001)(6246003)(19627405001)(16003)(57326003)(6306002)(54556002)(26005)(7596002)(7636002)(46656002)(336012)(476003)(86362001)(33964004)(14444005)(5660300002)(84326002)(76176011)(446003)(11346002)(74482002)(105004)(2616005)(126002)(426003)(21314003);DIR:INB;SFP:;SCL:1;SRVR:AM6PR03MB3816;H:mr30.theemaillaundry.net;FPR:;SPF:None;LANG:en;PTR:mr30.theemaillaundry.net;A:1;MX:1;
    X-MS-Exchange-Organization-AuthSource:
     VI1EUR04FT035.eop-eur04.prod.protection.outlook.com
    X-MS-Exchange-Organization-AuthAs: Anonymous
    X-MS-PublicTrafficType: Email
    X-MS-Office365-Filtering-Correlation-Id: 0963b9be-507e-4da1-65d9-08d6b20c6a92
    X-Microsoft-Antispam:
     BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(5600127)(711020)(4605104)(49563074)(1401299)(1421009)(71702078);SRVR:AM6PR03MB3816;
    X-MS-TrafficTypeDiagnostic: AM6PR03MB3816:
    X-MS-Exchange-Organization-SCL: 1
    X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2019 16:59:31.5653
     (UTC)
    X-MS-Exchange-CrossTenant-Network-Message-Id: 0963b9be-507e-4da1-65d9-08d6b20c6a92
    X-MS-Exchange-CrossTenant-Id: d06c4993-a045-45c6-a1d9-c808440ef213
    X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
    X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB3816
    X-MS-Exchange-Transport-EndToEndLatency: 00:00:01.6377032
    X-MS-Exchange-Processed-By-BccFoldering: 15.20.1730.017
    X-Microsoft-Antispam-Mailbox-Delivery:
    	ucf:0;jmr:0;ex:0;auth:0;dest:I;ENG:(20160514016)(750119)(520011016)(944506303)(944626516);
    X-Microsoft-Antispam-Message-Info:
    	2jFc8nZP5d13KuSakCSM7nU+u7kKpXmcY6R3Jlk23M3RC40W8xnhdN6CleyHxIk5uBREAVPvyKa7cF+tpHU668L9wLKAQ2epQgQmAsygrYpV4OMx1jfrnAFmUjdsUOfJnh7UYtM4Cc9/V5YdJJLmLWfXSPb5tziOPH2FjSsXYmXFckDVKdLcMqEalFaUAQ7LoGroOYL7m8xsLrqhevdU/WmvIgoJaqwVcrX5k5gq9Y689PbR4kqRM60w1K4WL8okd0ur24DjwZTIDIKdXdJXp6mtWDYtbBjmhEj+CNfDtvO80uyRZp52s/oQizxeg/97juHKw76XbCPpMWAcl6jQft4VEezWM9WrIgFN8Let9a81c7lYklu6Y++J5CdXQT31/WIaDYebUEync+BhKR4KiHIukJWnZ8UhgAGpG2wY955EwqSNCdvzQkXNGXNIrE4OwRIktcOvNAruBEIwNVorDLuTXmNd6Nd3BihrWvgPSlxWtxnaLNmjAliJXU0C1ZAfbARH0oDorpEAlATemRVIrM8rNUzNPoOUuqdD2J5TmtdaMaioKGkyzyk7Reg6+knEsreuKE7fkQZtldVg96relRIco8ouSRzA3WKxTwidvI5zH5KhO4q7PrO0gg5Op9AUBzMn2bt4YF+MUj7TL9Coo2CsRekXRV/1/C9TGX8pdjj7GOpwqfCIgRZmEjwa772PqVjL2klEiR8WGPZZ+7GWR2xqlao6ocFL66sjnCRMXlcUowlt2Z7xWjpAFTPAnI3huUvgcTE3OGIc/ApvQbc5HHWjieSZewly0ALtu+8BV5HK9d4RVXSaR+5/IXX1YZvSOP1LbDFb0YETHwkAYmzpkZ2AnFBzmU5w6Ya+92pTwFc=
    
    bug Validating 
    opened by kasperfd 23
  • Exception Parse Data

    Exception Parse Data

    Hello, I'm getting this exception

    error-email-imap

    I added a try in the parse header function in the message class to pass the error.

    private function parseHeader() { $header = imap_fetchheader($this->client->connection, $this->uid, $this->fetch_options); if ($header) { $header = imap_rfc822_parse_headers($header); }

    if (property_exists($header, 'subject')) {
        $this->subject = imap_utf8($header->subject);
    }
    if (property_exists($header, 'date')) {
        try{
            $this->date = Carbon::parse($header->date);
        }catch (\Exception $e){
        }
    }
    if (property_exists($header, 'from')) {
        $this->from = $this->parseAddresses($header->from);
    }
    if (property_exists($header, 'to')) {
        $this->to = $this->parseAddresses($header->to);
    }
    if (property_exists($header, 'cc')) {
        $this->cc = $this->parseAddresses($header->cc);
    }
    if (property_exists($header, 'bcc')) {
        $this->bcc = $this->parseAddresses($header->bcc);
    }
    
    if (property_exists($header, 'reply_to')) {
        $this->reply_to = $this->parseAddresses($header->reply_to);
    }
    if (property_exists($header, 'sender')) {
        $this->sender = $this->parseAddresses($header->sender);
    }
    
    if (property_exists($header, 'message_id')) {
        $this->message_id = str_replace(['<', '>'], '', $header->message_id);
    }
    if (property_exists($header, 'Msgno')) {
        $this->message_no = ($this->fetch_options == FT_UID) ? trim($header->Msgno) : imap_msgno($this->client->getConnection(), trim($header->Msgno));
    }
    

    }

    enhancement 
    opened by GuiAndra 18
  • New config not recognized?

    New config not recognized?

    Hello there, after upgrading from 1.6.2 to 2.0.2, publishing the new config, clearing all the laravel caches, even removing and reinstalling via composer i'm stuck at this error:

    ErrorException  : Trying to access array offset on value of type null
      at /home/tobbel/git/xxx/vendor/webklex/php-imap/src/Client.php:242
    
    

    while testing the configs i added the events and masks to my client - config:

    [...]
    use Webklex\PHPIMAP\Client;
    [...]
        public function handle() {
            [...]
            $oClient = new Client([
                'host' => $imap['server'],
                'port' => $imap['port'],
                'encryption' => $imap['security'],
                'validate_cert' => (true === $imap['allowUnsecure']) ? false : true,
                'username' => $imap['user'],
                'password' => $imap['password'],
                'protocol' => 'imap',
                'authentication' => null,
                'events' => [
                    "message" => [
                        'new' => \Webklex\IMAP\Events\MessageNewEvent::class,
                        'moved' => \Webklex\IMAP\Events\MessageMovedEvent::class,
                        'copied' => \Webklex\IMAP\Events\MessageCopiedEvent::class,
                        'deleted' => \Webklex\IMAP\Events\MessageDeletedEvent::class,
                        'restored' => \Webklex\IMAP\Events\MessageRestoredEvent::class,
                    ],
                    "folder" => [
                        'new' => \Webklex\IMAP\Events\FolderNewEvent::class,
                        'moved' => \Webklex\IMAP\Events\FolderMovedEvent::class,
                        'deleted' => \Webklex\IMAP\Events\FolderDeletedEvent::class,
                    ],
                    "flag" => [
                        'new' => \Webklex\IMAP\Events\FlagNewEvent::class,
                        'deleted' => \Webklex\IMAP\Events\FlagDeletedEvent::class,
                    ],
                ],
                'masks' => [
                    'message' => \Webklex\PHPIMAP\Support\Masks\MessageMask::class,
                    'attachment' => \Webklex\PHPIMAP\Support\Masks\AttachmentMask::class
                ],
            ]);
    
            $oClient->connect();
            [...]
        }
    [...]
    

    Afther that change, the only difference was the location of the error message:

    ErrorException  : Trying to access array offset on value of type null
      at /home/tobbel/git/xxx/vendor/webklex/php-imap/src/Client.php:199
    
    

    after adding some Logging i narrowed it down, in the setXXXFromConfig functions, it's trying to access the default config and add the events/masks, but those default parts are empty (Probaby they should come from the app->config->imap). Even logging inside the "php-imap/Client.php" and inside of the ClientManager Classes showed only empty application config objects.

    I'm calling this from a console command and dispatch this to a job, does this interfere with the way of accessing the configuration? Or am I supposed to do something further after upgrading? Php version: 7.4.3 Laravel 6.x

    Cheers and thanks!

    bug validated 
    opened by DasTobbel 16
  • A non well formed numeric value encountered

    A non well formed numeric value encountered

    Webklex\IMAP\Exceptions\GetMessagesFailedException A non well formed numeric value encountered

    PHP = 7.4 Lara = 7.24

    Error occurring at: $oFolder->messages()->get(); $oFolder->messages()->leaveUnread()->get()->paginate(10);

    It works perfectly on other server with different email service provider but on my current server I am using its email service provider which is causing me this issue. Can you help me out here?

    bug solved 
    opened by Syed-IR 16
  • IDLE not firing event or callback

    IDLE not firing event or callback

    Hello, I've started implementing this package into my project and am having some success with manually fetching emails but would really like to use the IDLE function to avoid setting up a scheduler to run a command every minute.

    The problem is that my code seems to enter the idle phase but never trigger the MessageNewEvent or the callback. I currently have this code set up as an artisan command:

    $client = Client::account('default');
    $client->connect();
    
    $folder = $client->getFolder('INBOX');
    $messages = $folder->messages()->unseen()->get();
    dump($messages->total());
    Log::info($messages->total());
    foreach($messages as $message) {
        Log::info($message->getRawBody());
    }
    
    $folder->idle(function($message){
        dump('new message', $message->getRawBody());
        Log::info($message->getRawBody());
    });
    

    When I run the command, any currently unseen emails are marked as read and the body is logged, after that the command continues to block the terminal in what I assume to be the IDLE phase, but receiving a new email on the watched inbox does absolutely nothing. No Log, no dump, no event, and the message stays marked as "unseen" in the inbox.

    Any ideas as to what might be causing the issue are greatly appreciated!

    bug Validating 
    opened by frenchykiller 14
  • Use of undefined constant FT_UID - assumed 'FT_UID'

    Use of undefined constant FT_UID - assumed 'FT_UID'

    Hi there!

    I just did a fresh installation of your package and encouterd the following error

    Use of undefined constant FT_UID - assumed 'FT_UID'
    

    Its comming from your package because it appears as soon as i add the package server provider. Im not doing anything with the package yet.

    I hope this gives you some information.

    Kinda regards,

    Robert

    help wanted 
    opened by robertscholts 14
  • [ErrorException]   Use of undefined constant FT_UID - assumed 'FT_UID'

    [ErrorException] Use of undefined constant FT_UID - assumed 'FT_UID'

    Hi,

    I got this error [ErrorException] Use of undefined constant FT_UID - assumed 'FT_UID' when I add your provider and alias into config\app.php inside the arrays of providers and aliases . Your document also wrongly indicate to add the provider and alias inside config/imap.php please check the document and change to config/app.php

    Thanks for your contribution to the open source world.

    help wanted 
    opened by Reegan01 12
  • Unable to get folders

    Unable to get folders

    Hi!

    Great library, seems to do what I need very well :)

    Just wanted to let you know, that i get error while trying to get all folders from Office 365.

    Here's my test code:

    $oClient = \Webklex\IMAP\Facades\Client::account('default');
    $oClient->connect();
    $aMailboxes = $oClient->getFolders();
    

    Result:

    "Invalid argument supplied for foreach()" in Client.php (line 232).

    I tracked down the "bug" to this recursive function on line 236: $children = $this->getFolders(true, $pattern);

    2 of my folders go that part of the scripts what are:

    • Conversation History/%
    • Yhteystiedot/%

    If I skip both of them in items loop, everything works fine.

    Unfortunately I was not able to figure out how to fix it.

    bug 
    opened by jamipietila 11
  • Unseen method doesn't work

    Unseen method doesn't work

    Unseen method doesn't work, what am I doing wrong ?, I've tried everything

    $oFolder = $oClient->getFolder('INBOX'); dd($oFolder->query()->all()->count()); //OK result 1254 mails

    dd($oFolder->query()->unseen()->get()); // 0 mails or dd($oFolder->query()->where('UNSEEN')->get()); // 0 mails or dd($oFolder->getUnseenMessages()); // 0 mails or dd($oFolder->search()->unseen()->get()->count()); // 0 mails

    OBS: I'm using IMAP office 365

    opened by fabyo 10
  • How to Reply on MessageID to continue an email thread?

    How to Reply on MessageID to continue an email thread?

    I have listed out the emails using the Webklex Laravel Imap and got the MessageID with other parameters. Now, my issue is how to reply to the same MessageId in Reply and Reply All email.

    If I will compose an email to Reply Email then it will create a new thread instead of the old one.

    So, how to achieve this. Help me out with this issue.

    Thank you.

    opened by UmeshKrRana 10
  • How to get raw subject ?

    How to get raw subject ?

    Hello, I need get raw subject but I can't find how to get raw subject.

    ทดสอบ นำส่งจดหมายผ ??ˆ?????™????????š??š???????????????

    2022-11-18_12-13-07

    expected : ทดสอบ นำส่งจดหมายผ่านระบบอีเมล

    but if i can retrieve get raw header subject It will work.

    simple :

    2022-11-18_12-20-49

    I'am try:

    $subject_raw = "=?UTF-8?B?4LiX4LiU4Liq4Lit4LiaIOC4meC4s+C4quC5iOC4h+C4iOC4lOC4q+C4oeC4suC4ouC4nA==?=
                    =?UTF-8?B?4LmI4Liy4LiZ4Lij4Liw4Lia4Lia4Lit4Li14LmA4Lih4Lil?=";
    echo mb_decode_mimeheader($subject_raw);
    
    // output : ทดสอบ นำส่งจดหมายผ่านระบบอีเมล  <-- is work
    

    Version: Laravel 8, php 7.4

    opened by abcprintf 0
  • Can't retrieve messages, always returns 0

    Can't retrieve messages, always returns 0

    Hello

    No matter what I try , I always get a zero message count. I've tried the standard sample. I've tried $folder->query()->all()->count() , I've tried $folder->query()->all()->get()->first() I've tried with getSubject() in foreach .... nothing seems to work.

    When I foreach trough folders and echo $folder->name , I get "INBOX" as result

    ANy starter advise to get this going ? Much appreciated !!

    opened by DevHeaven 4
  • Webklex\PHPIMAP\Exceptions\RuntimeException: idle failed

    Webklex\PHPIMAP\Exceptions\RuntimeException: idle failed

    Describe the bug After 10-30minutes of running custom idle command per instructions (https://www.php-imap.com/frameworks/laravel/commands) I get the following error:

    [2022-10-11 13:30:58] production.ERROR: Webklex\PHPIMAP\Exceptions\RuntimeException: idle failed in /var/www/laravel/vendor/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php:1055
    Stack trace:
    #0 /var/www/laravel/vendor/webklex/php-imap/src/Folder.php(402): Webklex\PHPIMAP\Connection\Protocols\ImapProtocol->idle()
    #1 /var/www/laravel/app/Console/Commands/PayTicketIdleCommand.php(81): Webklex\PHPIMAP\Folder->idle()
    #2 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\PayTicketIdleCommand->handle()
    #3 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
    #4 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
    #5 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
    #6 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\Container\BoundMethod::call()
    #7 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\Container\Container->call()
    #8 /var/www/laravel/vendor/symfony/console/Command/Command.php(298): Illuminate\Console\Command->execute()
    #9 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run()
    #10 /var/www/laravel/vendor/symfony/console/Application.php(1015): Illuminate\Console\Command->run()
    #11 /var/www/laravel/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()
    #12 /var/www/laravel/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
    #13 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Console/Application.php(94): Symfony\Component\Console\Application->run()
    #14 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run()
    #15 /var/www/laravel/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
    #16 {main}
    

    I am connected to Gmail business account

    Desktop / Server (please complete the following information):

    • OS: Cenots 7
    • PHP: PHP 8.1.9
    • Version "webklex/laravel-imap": "^4.0",
    opened by dokicro 7
  • v4.0 Still can't read emails after running for a while  and Read email content returns null

    v4.0 Still can't read emails after running for a while and Read email content returns null

    1.Still can't read emails after running for a while

    << * OK Gimap ready for requests from 118.26.*.* ******
    >> TAG1 LOGIN "*****@gmail.com" "*******"
    << * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT LIST-EXTENDED LIST-STATUS LITERAL- SPECIAL-USE APPENDLIMIT=35651584
    << TAG1 OK ******@gmail.com authenticated (Success)
    >> TAG2 CAPABILITY
    << * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT LIST-EXTENDED LIST-STATUS LITERAL- SPECIAL-USE APPENDLIMIT=35651584
    << TAG2 OK Success
    >> TAG3 SELECT "INBOX"
    << * FLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotPhishing $Phishing)
    << * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotPhishing $Phishing \*)] Flags permitted.
    << * OK [UIDVALIDITY 1] UIDs valid.
    << * 0 EXISTS
    << * 0 RECENT
    << * OK [UIDNEXT 86] Predicted next UID.
    << * OK [HIGHESTMODSEQ 17601]
    << TAG3 OK [READ-WRITE] INBOX selected. (Success)
    >> TAG4 IDLE
    << + idling
    >> DONE
    << TAG4 OK IDLE terminated (Success)
    >> TAG5 IDLE
    << + idling
    >> DONE
    << TAG5 OK IDLE terminated (Success)
    >> TAG6 IDLE
    << + idling
    >> DONE
    << TAG6 OK IDLE terminated (Success)
    >> TAG7 IDLE
    << + idling
    >> DONE
    << TAG7 OK IDLE terminated (Success)
    >> TAG8 IDLE
    << + idling
    >> DONE
    << TAG8 OK IDLE terminated (Success)
    >> TAG9 IDLE
    << + idling
    >> DONE
    << TAG9 OK IDLE terminated (Success)
    >> TAG10 IDLE
    << + idling
    >> DONE
    << TAG10 OK IDLE terminated (Success)
    >> TAG11 IDLE
    << + idling
    >> DONE
    << TAG11 OK IDLE terminated (Success)
    >> TAG12 IDLE
    << + idling
    >> DONE
    << TAG12 OK IDLE terminated (Success)
    >> TAG13 IDLE
    << + idling
    =======================================
    No log output after running here,But the process is running..
    
    [root@10-50-114-48 ~]# netstat -an|grep 993
    tcp        0      0 10.50.114.48:64400      173.194.76.109:993      CLOSE_WAIT
    
    [2022-09-28 04:04:11] online.INFO: read line
    [2022-09-28 04:09:11] online.INFO: Exception:empty response
    [2022-09-28 04:09:11] online.INFO: read line
    [2022-09-28 04:14:11] online.INFO: Exception:empty response
    [2022-09-28 04:14:12] online.INFO: read line
    [2022-09-28 04:19:12] online.INFO: Exception:empty response
    [2022-09-28 04:19:12] online.INFO: read line
    [2022-09-28 04:24:12] online.INFO: Exception:empty response
    [2022-09-28 04:24:12] online.INFO: read line
    =======================================
    No log output after running here,But the process is running..
    

    It looks like the program keeps getting stuck in the nextLine() function..

    2.When there are multiple emails in the inbox, the content of the read email is empty

    $messages = $folder->messages()->all()->get();
        
        /** @var \Webklex\PHPIMAP\Message $message */
        foreach($messages as $message){
            echo $message->getSubject().'<br />'; //Subject acquisition is correct
            echo $message->getHTMLBody();//return empty ,can't get HTML Body
            if($message->move('INBOX.read') == true){
                echo 'Message has ben moved';
            }else{
                echo 'Message could not be moved';
            }
        }
    
    opened by Blear 1
  • getAttachments returns null

    getAttachments returns null

    Hello, thanks for the project! I want to use a command and when I receive a new email, save the attachment to a file. My command code:

       . . . 
        public function onNewMessage(Message $message){
          if ($message->getAttachments()->count() == 1) {
             $message->getAttachments()->first()->save(storage_path('frames/save'));
           }
    
          $this->info("New message received: ".$message->subject);
          $this->info( "New message received: ". $message->getAttachments() );
        }
       . . .
    

    But when sending email in console I get this:

    _php artisan NameMyCommand

    image

    p/s I use Laravel Framework 8.83.23

    opened by Waiker 2
  • performance of version 4.0.0

    performance of version 4.0.0

    Describe the bug I'm using 2.4.0 which is fine until I get to 4.0.0. The amount of CPU consumed a lot every time I connect to my project, it is always in 100% state I am using it to download imap emails from 60 emails at the same time

    To Reproduce try to compare the connection of CPU consumption between the 2 versions

    Expected behavior I hope to improve performance again

    Screenshots image

    Desktop / Server (please complete the following information):

    • OS: CentOS
    • PHP: 8.1
    • Version 4.0.0

    Additional context the old methods to getForm() getTo() getCc() don't seem to work anymore

    opened by vigstudio 2
Releases(4.0.0)
  • 4.0.0(Aug 19, 2022)

    Fixed

    • PHP dependency updated to support php v8.0 (thanks @freescout-helpdesk)
    • Method return and argument types added
    • Imap DONE method refactored
    • UID cache loop fixed
    • HasEvent::getEvent return value set to mixed to allow multiple event types
    • Protocol line reader changed to fread (stream_context timeout issue fixed)
    • Issue setting the client timeout fixed
    • IMAP Connection debugging improved
    • Folder::idle() method reworked and several issues fixed
    • Datetime conversion rules extended

    Breaking changes

    • No longer supports php >=5.5.9 but instead requires at least php v7.0.0.
    • HasEvent::getEvent returns a mixed result. Either an Event or a class string representing the event class.
    • The error message, if the connection fails to read the next line, is now empty response instead of failed to read - connection closed?.
    • The $auto_reconnect used with Folder::indle() is deprecated and doesn't serve any purpose anymore.
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0-alpha(Nov 10, 2021)

    Fixed

    • Debug line position fixed
    • Handle incomplete address to string conversion
    • Configured message key gets overwritten by the first fetched message
    • Attachment::save() return error 'A facade root has not been set'
    • Unused dependencies removed
    • Fix PHP 8 error that changes null back in to an empty string. (thanks @mennovanhout)
    • Fix regex to be case insensitive (thanks @mennovanhout)
    • Attachment detection updated
    • Timeout handling improved
    • Additional utf-8 checks added to prevent decoding of unencoded values
    • Boundary detection simplified
    • Prevent potential body overwriting
    • CSV files are no longer regarded as plain body
    • Boundary detection overhauled to support "related" and "alternative" multipart messages
    • Attachment saving filename fixed
    • Unnecessary parameter removed from Client::getTimeout()
    • Missing encryption variable added - could have caused problems with unencrypted communications
    • Prefer attachment filename attribute over name attribute
    • Missing connection settings added to Folder:idle() auto mode
    • Message move / copy expect a folder path
    • Client::getFolder() updated to circumvent special edge cases
    • Missing connection status checks added to various methods
    • Unused default attribute message_no removed from Message::class
    • Fix setting default mask from config (thanks @shacky)
    • Chunked fetch fails in case of less available mails than page size
    • Protocol::createStream() exception information fixed
    • Legacy methods (headers, content, flags) fixed
    • Legacy connection cycle fixed (thanks @zssarkany)
    • Several POP3 fixes (thanks @Korko)
    • Fixes handling of long header lines which are seperated by \r\n\t (thanks @Oliver-Holz)
    • Fixes to line parsing with multiple addresses (thanks @Oliver-Holz)
    • Fixed problem with skipping last line of the response. (thanks @szymekjanaczek)
    • Extend date parsing error message
    • Fixed 'Where' method replaces the content with uppercase
    • Don't surround numeric search values with quotes
    • Context added to InvalidWhereQueryCriteriaException
    • Redundant stream_set_timeout() removed

    Added

    • Auto reconnect option added to Folder::idle()
    • Dynamic Attribute access support added (e.g $message->from[0])
    • Message not found exception added
    • Chunked fetching support added Query::chunked(). Just in case you can't fetch all messages at once
    • "Soft fail" support added
    • Count method added to Attribute:class
    • Convert an Attribute instance into a Carbon date object
    • Disable rfc822 header parsing via config option
    • Added imap 4 handling. (thanks @szymekjanaczek)
    • Added laravel's conditionable methods. (thanks @szymekjanaczek)
    • Expose message folder path (thanks @Magiczne)
    • Adds mailparse_rfc822_parse_addresses integration (thanks @Oliver-Holz)
    • Added moveManyMessages method (thanks @Magiczne)
    • Added copyManyMessages method (thanks @Magiczne)
    • Added UID as available search criteria (thanks @szymekjanaczek)
    • Make boundary regex configurable (thanks @EthraZa)
    • IMAP ID support added
    • Enable debug mode via config
    • Custom UID alternative support added
    • Fetch additional extensions using Folder::query(["FEATURE_NAME"])
    • Optionally move a message during "deletion" instead of just "flagging" it (thanks @EthraZa)
    • WhereQuery::where() accepts now a wide range of criteria / values.

    Breaking changes

    • A new exception can occur if a message can't be fetched (\Webklex\PHPIMAP\Exceptions\MessageNotFoundException::class)
    • Message::move() and Message::copy() no longer accept folder names as folder path
    • A Message::class instance might no longer have a message_no attribute
    • All protocol methods which had a boolean $uid option no longer support a boolean. Use IMAP::ST_UID or IMAP::NIL instead. If you want to use an alternative to UID just use the string instead.
    • Default config option options.sequence changed from IMAP::ST_MSGN to IMAP::ST_UID.
    • Folder::query() no longer accepts a charset string. It has been replaced by an extension array, which provides the ability to automatically fetch additional features.
    Source code(tar.gz)
    Source code(zip)
  • 2.4.0(Jan 9, 2021)

    Fixed

    • Attachment::save() return error 'A facade root has not been set'
    • Unused dependencies removed
    • Fix PHP 8 error that changes null back in to an empty string. (thanks @mennovanhout)
    • Fix regex to be case insensitive (thanks @mennovanhout)
    • Debug line position fixed
    • Handle incomplete address to string conversion
    • Configured message key gets overwritten by the first fetched message
    • Get partial overview when IMAP::ST_UID is set
    • Unnecessary "'" removed from address names
    • Folder referral typo fixed
    • Legacy protocol fixed
    • Treat message collection keys always as strings
    • Missing RFC attributes added
    • Set the message sequence when idling
    • Missing UID commands added

    Added

    • Configurable supported default flags added
    • Message attribute class added to unify value handling
    • Address class added and integrated
    • Alias Message::attachments() for Message::getAttachments() added
    • Alias Message::addFlag() for Message::setFlag() added
    • Alias Message::removeFlag() for Message::unsetFlag() added
    • Alias Message::flags() for Message::getFlags() added
    • New Exception MessageFlagException::class added
    • New method Message::setSequenceId($id) added
    • Optional Header attributizion option added
    • Get a message by its message number
    • Get a message by its uid

    Breaking changes

    • Stringified message headers are now separated by ", " instead of " ".
    • All message header values such as subject, message_id, from, to, etc now consists of an Àttribute::class instance (should behave the same way as before, but might cause some problem in certain edge cases)
    • The formal address object "from", "to", etc now consists of an Address::class instance (should behave the same way as before, but might cause some problem in certain edge cases)
    • When fetching or manipulating message flags a MessageFlagException::class exception can be thrown if a runtime error occurs
    • Learn more about the new Attribute class here: www.php-imap.com/api/attribute
    • Learn more about the new Address class here: www.php-imap.com/api/address
    • Folder attribute "referal" is now called "referral"
    Source code(tar.gz)
    Source code(zip)
  • 2.3.0(Dec 21, 2020)

    Fixed

    • Missing env variable IMAP_AUTHENTICATION added
    • Header decoding problem fixed
    • IMAP::FT_PEEK removing "Seen" flag issue fixed
    • Text/Html body fetched as attachment if subtype is null
    • Potential header overwriting through header extensions
    • Prevent empty attachments
    • Search performance increased by fetching all headers, bodies and flags at once
    • Legacy protocol support updated
    • Fix Query pagination. (thanks @mikemiller891)
    • Missing array decoder method added (thanks @lutchin)
    • Additional checks added to prevent message from getting marked as seen
    • Boundary parsing improved (thanks @AntonioDiPassio-AppSys)
    • Idle operation updated
    • Cert validation issue fixed
    • Allow boundaries ending with a space or semicolon (thanks @smartilabs)
    • Ignore IMAP DONE command response
    • Default options.fetch set to IMAP::FT_PEEK
    • Address parsing fixed
    • Alternative rfc822 header parsing fixed
    • Parse more than one header key
    • Fetch folder overview fixed
    • Message::getTextBody() fallback value fixed

    Added

    • Default folder locations added
    • Search for messages by message-Id
    • Search for messages by In-Reply-To
    • Message threading added Message::thread()
    • Default folder locations added
    • Set fetch order during query @Max13
    • Missing message setter methods added
    • Folder::overview() method added to fetch all headers of all messages in the current folder
    • Force a folder to be opened
    • Proxy support added
    • Flexible disposition support added
    • New options.message_key option uid added
    • Protocol UID support added
    • Flexible sequence type support added

    Breaking changes

    • Depending on your configuration, your certificates actually get checked. Which can cause an aborted connection if the certificate can not be validated.
    • Messages don't get flagged as read unless you are using your own custom config.
    • All Header::class attribute keys are now in a snake_format and no longer minus-separated.
    • Message::getTextBody() no longer returns false if no text body is present. null is returned instead.
    Source code(tar.gz)
    Source code(zip)
  • 2.2.0(Oct 16, 2020)

    Fixed

    • Prevent text bodies from being fetched as attachment
    • Missing variable check added to prevent exception while parsing an address #356
    • Missing variable check added to prevent exception while parsing a part subtype
    • Missing variable check added to prevent exception while parsing a part content-type #356
    • Mixed message header attribute in_reply_to "unified" to be always an array
    • Potential message moving / copying problem fixed
    • Move messages by using Protocol::moveMessage() instead of Protocol::copyMessage() and Message::delete()
    • Boundary detection problem fixed (@DasTobbel)
    • Content-Type detection problem fixed (@DasTobbel)
    • If content disposition is multiline, implode the array to a simple string (@DasTobbel)
    • Potential problematic prefixed white-spaces removed from header attributes
    • Fix inline attachments and embedded images (@dwalczyk)
    • Possible error during address decoding fixed (@Slauta)
    • Flag event dispatching fixed
    • Fixed Query::paginate() (@Max13)
    • Message::getAttributes() hasn't returned all parameters
    • Wrong message content property reference fixed
    • Fix header extension values
    • Part header detection method changed
    • Possible decoding problem fixed
    • Str::class dependency removed from Header::class
    • Dependency problem in Attachement::getExtension() fixed
    • Quota handling fixed

    Added

    • Protocol::moveMessage() method added
    • Expended Client::getFolder($name, $deleimiter = null) to accept either a folder name or path (@DasTobbel)
    • Special MS-Exchange header decoding support added
    • ClientManager::make() method added to support undefined accounts
    • Alternative attachment names support added (@oneFoldSoftware)
    • Fetch message content without leaving a "Seen" flag behind
    • Support multiple boundaries (@dwalczyk)
    • Part number added to attachment
    • Client::getFolderByPath() added (@Max13)
    • Client::getFolderByName() added (@Max13)
    • Throws exceptions if the authentication fails (@Max13)
    • Default account config fallback added

    Breaking changes

    • Text bodies might no longer get fetched as attachment
    • Message::$in_reply_to type changed from mixed to array
    Source code(tar.gz)
    Source code(zip)
  • 2.1.1(Oct 15, 2020)

  • 2.1.0(Oct 8, 2020)

    Fixed

    • Redundant class ClientManager::class removed and config handling moved to depending library "webklex/php-imap" #345 #344

    Breaking changes

    • \Webklex\IMAP\ClientManager::class no longer exists. Please use the \Webklex\IMAP\Facades\Client::class facade or \Webklex\PHPIMAP\ClientManager::class instead.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.2(Sep 22, 2020)

  • 2.0.1(Sep 22, 2020)

  • 2.0.0(Sep 22, 2020)

    Fixed

    • Encoding / Decoding improved and exception fallback added
    • Missing pagination item records fixed (#287, #329)
    • Missing attachments problem solved (#284, #277)

    Added

    • php-imap module replaced by direct socket communication
    • Package core moved to webklex/php-imap
    • Legacy protocol support added
    • True IMAP IDLE support added (#185)
    • oAuth support added (#180)
    • Dynamic and customizable events added
    • Fetching all available headers (#282)

    Breaking changes

    • Most class namespaces have changed from IMAP to PHPIMAP
    • Method response structure has changed in most classes
    • Deprecated methods removed
    • New exceptions can occur
    Source code(tar.gz)
    Source code(zip)
  • 1.6.2(Sep 7, 2020)

    Fixed

    • Exception handling improved and missing child exception added (#326)
    • Fix 'A non well formed numeric value encountered' ErrorException (#327)
    Source code(tar.gz)
    Source code(zip)
  • 1.6.1(Sep 4, 2020)

    Fixed

    • Greatly increased IDLE performance
    • Redundant code removed

    Added

    • Read an overview of the information in the headers of a given message or sequence
    • Folder name encoding added (#324) (@aperture-it)
    • Add a fallback when aliasing encodings for iconv (#325) (@Hokan22)
    • Method to receive the encoded folder name added
    Source code(tar.gz)
    Source code(zip)
  • 1.6.0(Sep 4, 2020)

    Fixed

    • Default fetch attributes set to null in order to use the config default value

    Added

    • "BADCHARSET" exception will be used to determine the required charset (#100)

    Breaking changes

    • Client::getMessages() default fetch parameter changed
    • Folder::getMessages() default fetch parameter changed
    • Folder::getMessage() default fetch parameter changed
    Source code(tar.gz)
    Source code(zip)
  • 1.5.3(Aug 24, 2020)

  • 1.5.2(Aug 24, 2020)

  • 1.5.1(Aug 23, 2020)

  • 1.5.0(Aug 20, 2020)

    Fixed

    • Point to root namespace if handling native functions (#279)
    • Use address charset from header information if set (#286)
    • Fix Attachment::getExtension() under Laravel 7.x (#290)
    • Custom and X-Spam search criteria fixed (#296)

    Added

    • Prevent double where condition strings
    • Optional iconv_mime_decode() support added (#295)

    Breaking changes

    • Custom search conditions have to begin with CUSTOM
    Source code(tar.gz)
    Source code(zip)
  • 1.4.5(Jan 23, 2020)

    Fixed

    • Convert encoding of personal data struct #272
    • Test & implement fix for #203 #270 #235

    Added

    • Attachment size handling added #276
    • Find messages by custom search criteria #268
    Source code(tar.gz)
    Source code(zip)
  • 1.4.4(Nov 29, 2019)

    Fixed

    • Date handling in Folder::appendMessage() fixed #224
    • Carbon Exception Parse Data #45
    • Convert sender name from non-utf8 to uf8 #260 (@hwilok) #259
    Source code(tar.gz)
    Source code(zip)
  • 1.4.3(Sep 17, 2019)

    Fixed

    • .csv attachement is not processed #231
    • mail part structure property comparison changed to lowercase #241 #242
    • Replace helper functions for Laravel 6.0 #250 (@koenhoeijmakers)

    Added

    • Path prefix option added to Client::getFolder() method #234
    Source code(tar.gz)
    Source code(zip)
  • 1.4.2(Jul 2, 2019)

    Fixed

    • Pagination count total bug #213
    • Changed internal message move and copy methods #210
    • Query::since() query returning empty response #215
    • Carbon Exception Parse Data #45
    • Reading a blank body (text / html) but only from this sender #203

    Added

    • Message::getFolder() method
    • Create a fast count method for queries #216
    • STARTTLS encryption alias added
    Source code(tar.gz)
    Source code(zip)
  • 1.4.1(Apr 12, 2019)

    Fixed

    • Problem with Message::moveToFolder() and multiple moves #31
    • Problem with encoding conversion #203
    • Message null value attribute problem fixed
    • Client connection path handling changed to be handled inside the calling method #31

    Added

    • Mailbox fetching exception added #201
    • Message::moveToFolder() fetches new Message::class afterwards #31

    Breaking changes

    • Message::moveToFolder() returns either a Message::class instance or null and not a boolean
    Source code(tar.gz)
    Source code(zip)
  • 1.4.0(Mar 18, 2019)

    Fixed

    • iconv(): error suppressor for //IGNORE added #184
    • Typo Folder attribute fullName changed to full_name
    • Query scope error fixed #153

    Added

    • Message structure accessor added #182
    • Shadow Imap const class added #188
    • Connectable "NOT" queries added
    • Additional where methods added
    • Message attribute handling changed
    • Attachment attribute handling changed
    • Message flag handling updated
    • Message::getHTMLBody($callback) extended
    • Masks added (take look at the examples for more information on masks)
    • More examples added
    • Query::paginate() method added

    Breaking changes

    • Folder::fullName is now Folder::full_name
    • Attachment::image_src might no longer work as expected - use Attachment::getImageSrc() instead
    Source code(tar.gz)
    Source code(zip)
  • 1.3.1(Mar 12, 2019)

    Fixed

    • Replace embedded image with URL #151

    Added

    • Imap client timeout can be modified and read #186
    • Decoder config options added #175
    • Message search criteria "NOT" added #181
    Source code(tar.gz)
    Source code(zip)
  • 1.3.0(Mar 11, 2019)

    Fixed

    • Fix sender name in non-latin emails sent from Gmail (#155)
    • Fix broken non-latin characters in body in ASCII (us-ascii) charset #156
    • Message::getMessageId() returns wrong value #197
    • Message date validation extended #45 #192

    Added

    • Invalid message date exception added (\Webklex\IMAP\Exceptions\InvalidMessageDateException::class)
    Source code(tar.gz)
    Source code(zip)
  • 1.2.9(Sep 15, 2018)

  • 1.2.8(Aug 14, 2018)

  • 1.2.7(Aug 6, 2018)

  • 1.2.6(Aug 4, 2018)

    Fixed

    • Message subjects and attachment names will now be decoded with a guessed encoding #97 #107

    Added

    • Expunge option added to critical imap operations
    Source code(tar.gz)
    Source code(zip)
  • 1.2.5(Jul 30, 2018)

📧 Handy email creation and transfer library for PHP with both text and MIME-compliant support.

?? Handy email creation and transfer library for PHP with both text and MIME-compliant support.

Nette Foundation 401 Dec 22, 2022
Fetch is a library for reading email and attachments, primarily using the POP and IMAP protocols

Fetch Fetch is a library for reading email and attachments, primarily using the POP and IMAP protocols. Installing N.b. A note on Ubuntu 14.04 (probab

Tedious Developments 501 Jan 4, 2023
An IMAP library for PHP

Fetch Fetch is a library for reading email and attachments, primarily using the POP and IMAP protocols. Installing N.b. A note on Ubuntu 14.04 (probab

Tedious Developments 500 Dec 25, 2022
Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)

PHP IMAP Initially released in December 2012, the PHP IMAP Mailbox is a powerful and open source library to connect to a mailbox by POP3, IMAP and NNT

Sergey 1.5k Jan 3, 2023
IMAP Library for PHP

IMAP Library for PHP Description PHP-IMAP is a wrapper for common IMAP communication without the need to have the php-imap module installed / enabled.

null 157 Jan 7, 2023
Provides a clean and simple way to configure the WordPress-bundled PHPMailer library, allowing you to quickly get started sending mail through a local or cloud based service of your choice

WP PHPMailer provides a clean and simple way to configure the WordPress-bundled PHPMailer library, allowing you to quickly get started sending mail through a local or cloud based service of your choice.

Itineris Limited 61 Dec 6, 2022
Mail sending module for Mezzio and Laminas MVC with support for file attachment and template email composition

This module provides an easy and flexible way to send emails from Mezzio and Laminas MVC applications (formerly known as Zend Expressive and Zend MVC). It allows you to pre-configure emails and transports, and then send those emails at runtime.

null 82 Jan 16, 2022
CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very usefull when you're sending emails.

CssToInlineStyles class Installation CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline style

Tijs Verkoyen 5.7k Dec 29, 2022
This module is the core of phpList 4

phpList core module About phpList phpList is an open source newsletter manager. This project is a rewrite of the original phpList. About this package

phpList 84 Dec 23, 2022
Magento 2 Email Catcher or Email Logger Module.

Magento 2 Module Experius email catcher / - logger

Experius 49 Dec 16, 2021
SlmMail is a module that integrates with various third-parties API to send mails. Integration is provided with the API of those services

SlmMail is a module that integrates with various third-parties API to send mails. Integration is provided with the API of those services

Webador 107 Dec 14, 2022
Sending Email via Microsoft Exchange Web Services made Easy!

Send Mail via Exchange Web Services! Sending Email via Microsoft Exchange Web Services (EWS) made easy! Installation Install via Composer composer req

Raju Rayhan 19 Jul 19, 2022
💌 Mail app for Nextcloud

Nextcloud Mail ?? A mail app for Nextcloud Why is this so awesome? ?? Integration with other Nextcloud apps! Currently Contacts, Calendar & Files – mo

Nextcloud 684 Dec 26, 2022
PHPMailer-VerficationCode App

the App PHPMailer-VerficationCode App Steps To use it: install Xampp or Wampp Server copy and extlact the cloned project into htdocs in xammp Import .

Dominique Rwema Bagirishya 13 Jul 21, 2022
Simple mail sending by PHPMailer and Create your local system.

Simple mail sending by PHPMailer and Create your local system. Send mail zero of cost and also send Attachment like Photo, pdf and multiple files. You should be create a login and verify two steps authentication like OTP, verifications ?? link. PHPMailer make your dreams project eassy and simple also free of cost.

SUSHIL KUMBHAR 2 Dec 8, 2021
Offer an online version of your Laravel emails to users.

This is was a collaborative project with Ryan Chandler. Please consider supporting him for the hard work he put into this package! Help support the ma

Sam Carré 251 Dec 25, 2022
Queue, preview and and send emails stored in the database.

Codeigniter4 email queue Queue, preview and and send emails stored in the database. This package provides an interface for creating emails on the fly

null 3 Apr 12, 2022
SendPortal - Open-source self-hosted email marketing, subscriber and list management, email campaigns and more

SendPortal includes subscriber and list management, email campaigns, message tracking, reports and multiple workspaces/domains in a modern, flexible and scalable application.

Mettle 1.2k Jan 4, 2023
Cypht: Lightweight Open Source webmail written in PHP and JavaScript

All your E-mail, from all your accounts, in one place. Cypht is not your father's webmail. Unless you are one of my daughters, in which case it is your father's webmail. Cypht is like a news reader, but for E-mail. Cypht does not replace your existing accounts - it combines them into one. And it's also a news reader.

Jason Munro 773 Dec 30, 2022