Esempio n. 1
0
 /**
  * @param $arg[optional] = false
  * @return bool
  */
 function Connect($arg = false)
 {
     if ($this->_imapMail->connection != false) {
         return true;
     }
     register_shutdown_function(array(&$this, 'Disconnect'));
     if (!$this->_imapMail->open()) {
         setGlobalError(ErrorIMAP4Connect);
         return false;
     }
     if (!$this->_imapMail->login($this->Account->MailIncLogin, $this->Account->MailIncPassword)) {
         setGlobalError(ErrorPOP3IMAP4Auth);
         return false;
     }
     return true;
 }
Esempio n. 2
0
 /**
  * @return bool
  */
 function Connect()
 {
     if ($this->_imapMail->connection != false) {
         return true;
     }
     if (!$this->_imapMail->open()) {
         $this->SetError(ap_Utils::TakePhrase('WM_ERROR_IMAP4_CONNECT'));
         return false;
     } else {
         register_shutdown_function(array(&$this, 'Disconnect'));
     }
     if (!$this->_imapMail->login($this->_account->MailIncLogin, $this->_account->MailIncPassword)) {
         $this->SetError(ap_Utils::TakePhrase('WM_ERROR_POP3IMAP4AUTH'));
         return false;
     }
     return true;
 }
Esempio n. 3
0
<?php

include_once "imap.inc.php";
include_once "mimedecode.inc.php";
$imap = new IMAPMAIL();
if (!$imap->open("192.168.0.26", "143")) {
    echo $imap->get_error();
    exit;
}
$imap->login("harishc", "hchauhan");
echo $imap->error;
$response = $imap->open_mailbox("INBOX");
echo $imap->error;
//echo $response=$imap->get_msglist();
//echo $response=$imap->delete_message(9);
//echo $response=$imap->rollback_delete(9);
$response = $imap->get_message(1);
///Decoding the mail
$mimedecoder = new MIMEDECODE($response, "\r\n");
$msg = $mimedecoder->get_parsed_message();
print_r($msg);
//echo nl2br($response);
echo $imap->get_error();
$imap->close();
//$response=$imap->fetch_mail("3","BODYSTRUCTURE");
//print_r($response);
//echo nl2br($response);
//echo $imap->error;
echo "<br>";
Esempio n. 4
0
|                                                                   |
+----------------------- Studio 182 Team ---------------------------+
| Hunter Dolan <*****@*****.**>                               |
| Pablo Merino <*****@*****.**>                                |
+-------------------------------------------------------------------+
*/

require_once("./config/main.inc.php");
require_once("./program/lib/imap.inc.php");
require_once("./program/lib/mimedecode.inc.php");

$imap = new IMAPMAIL;

$imap->open($bloggy_config['imap_host'], $bloggy_config['imap_port']);

$imap->login($bloggy_config['imap_user'],$bloggy_config['imap_pass']);

$imap->open_mailbox($bloggy_config['imap_folder']);

if($imap->get_msglist() > 0) {

$mimedecoder=new MIMEDECODE($imap->get_message(1),"\r\n"); 
    
$data = parse($mimedecoder->get_parsed_message()->parts['0']->body, true);


if($data['password'] == $bloggy_config['mail_pass']) {
//If the passwords match, lets continue!
$data['password'] = null;

$data = array_filter($data);
Esempio n. 5
0
<?php

$gateway_db_select = 3;
include "../includes/dbconnection.php";
require_once "../includes/function.php";
require_once '../includes/phpmailer/imap.inc.php';
$log = "Searching for all bad emails...\n";
$imap = new IMAPMAIL();
if (!$imap->open("mail.etelegate.com", "143")) {
    $log .= $imap->get_error();
    print $log;
    exit;
}
$imap->login("ReturnedEmails+etelegate.com", "etelcs88");
$log .= $imap->error;
$response = $imap->open_mailbox("INBOX");
$log .= $imap->error;
$emailList = $imap->search_mailbox("SINCE " . date("d-M-Y", time() - 48 * 60 * 60) . " OR OR SUBJECT \"delayed 48 hours\" SUBJECT \"Undeliverable: Welcome to Gkard\" SUBJECT \"Mail delivery failed\"");
//echo $response=$imap->delete_message(9);
//echo $response=$imap->rollback_delete(9);
if (is_array($emailList)) {
    foreach ($emailList as $emailId) {
        $log .= " Checking Email #{$emailId}...\n";
        $content = $imap->get_message($emailId);
        //explode("",$content);
        //print_r($content);
        $matches = NULL;
        preg_match_all("/([A-Z0-9._-]+@[A-Z0-9.-]+\\.[A-Z]{2,6})/i", $content, &$matches);
        //print_r(array_unique($matches[1]));
        $foundEmails = $matches[1];
        $email = NULL;
Esempio n. 6
0
$email_accounts[0] = array("user" => "*****@*****.**", "pass" => "etelcscs", "type" => "Customer Service", "category" => 1, "gw_ID" => 3);
$email_accounts[1] = array("user" => "*****@*****.**", "pass" => "etelcscs", "type" => "Customer Service", "category" => 1, "gw_ID" => 4);
$email_accounts[2] = array("user" => "*****@*****.**", "pass" => "etelcscs", "type" => "Tech Support", "category" => 4, "gw_ID" => 3);
$email_accounts[3] = array("user" => "*****@*****.**", "pass" => "etelcscs", "type" => "Tech Support", "category" => 4, "gw_ID" => 4);
$email_accounts[4] = array("user" => "etel", "pass" => "po4rl3ph", "type" => "General Sales", "category" => 6, "gw_ID" => 3);
$log = "Searching for new emails...\n";
echo 'working...';
foreach ($email_accounts as $account) {
    $imap = new IMAPMAIL();
    if (!$imap->open("mail.etelegate.com", "143")) {
        $log .= $imap->get_error();
        print $log;
        continue;
    }
    $log .= "-Logging in as " . $account['user'] . "...\n";
    $imap->login($account['user'], $account['pass']);
    $log .= $imap->error;
    $response = $imap->open_mailbox("INBOX");
    $log .= $imap->error;
    $emailList = $imap->search_mailbox("UNSEEN SINCE " . date("d-M-Y", time() - 24 * 60 * 60));
    if (is_array($emailList)) {
        $log .= " Found " . sizeof($emailList) . " emails...\n";
        foreach ($emailList as $emailId) {
            echo '.';
            flush();
            $category = $account['type'];
            $log .= " Checking Email #{$emailId}...\n";
            $response = $imap->fetch_mail($emailId, "BODY[HEADER.FIELDS (SUBJECT FROM TO DATE)]");
            //print $response."<BR>";
            $response_ar = explode("\n", $response);
            $emailInfo = array();