Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/../../app/Http/Controllers
الملفات الموجودة في هذا الـ Path:
.
..
Admin
AssetController.php
Auth
Controller.php
Customer
FrontController.php
InboundController.php
RouteController.php
ScheduleController.php
UpgradeController.php

مشاهدة ملف: InboundController.php

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Webklex\PHPIMAP\ClientManager;

class InboundController extends Controller
{
    public function inbound(){


        $cm = new ClientManager($options = []);
        $client = $cm->account('account_identifier');
        $client = $cm->make([
            'host'          => 'imap.googlemail.com',
            'port'          => 993,
            'encryption'    => 'ssl',
            'validate_cert' => true,
            'username'      => 'sumon.picotech@gmail.com',
            'password'      => 'lybl eais tpjs nsog',
            'protocol'      => 'imap'
        ]);

        $messages=$client->getFolder('INBOX')->messages()->all()->limit($limit = 10, $page = 1)->setFetchOrder("desc")->get();

        foreach($messages as $message){

            dd($message->getSubject(), $message->getTextBody(), $message->getHTMLBody());

        }

        dd($client,$client->getFolders());

    }
}