Skip to content

Cannot read Sent folder and sent emails don't appear in provider's Sent folder #509

@newtec-foggia

Description

@newtec-foggia

Environment:

  • Laravel 10
  • PHP 8.1+
  • Webklex/laravel-imap 6.2.0
  • Provider: Aruba PEC (imaps.pec.aruba.it)

Issue:
I'm experiencing two related problems with the Sent folder:

  1. Cannot read Sent folder messages: When trying to read from the Sent folder (INBOX.Inviata), the response is blank or empty, even though there are emails in the Sent folder when accessed via webmail.

  2. Sent emails don't appear in provider's Sent folder: When sending emails via Laravel's Mail facade, the emails are sent successfully but don't appear in the provider's Sent folder. I've implemented IMAP append to save sent emails, but this only works for plain text.

Steps to reproduce:

  1. Reading Sent folder:
$client = Client::account('default');
$client->connect();
$sentFolder = $client->getFolder('INBOX.Inviata');
$messages = $sentFolder->messages()->all()->get();
// Returns empty collection even though emails exist
  1. Sending emails:
Mail::raw($message, function ($message) use ($to, $subject) {
    $message->to($to)->subject($subject);
});
// Email sent successfully but doesn't appear in Sent folder

Expected behavior:

  • Should be able to read existing emails from Sent folder
  • Sent emails should automatically appear in provider's Sent folder

Current workaround:

  • Using IMAP append to manually save sent emails (text only)
  • Reading Sent folder returns empty results

Configuration:

// config/imap.php
'accounts' => [
    'default' => [
        'host' => 'imaps.pec.aruba.it',
        'port' => 993,
        'encryption' => 'ssl',
        'validate_cert' => true,
        'username' => '[email protected]',
        'password' => '***',
        'protocol' => 'imap'
    ],
]

Questions:

  1. Is this a known issue with Aruba PEC provider?
  2. Are there specific configuration options for Sent folder handling?
  3. Should I use a different approach for saving sent emails?

Additional info:

  • Provider: Aruba PEC (Italian certified email provider)
  • Sent folder path: INBOX.Inviata
  • SMTP sending works, but emails don't appear in Sent folder
  • IMAP append works but only for plain text emails

Thank you for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions