PHP Classes

Loop infinite

Recommend this page to a friend!

      getEmail  >  All threads  >  Loop infinite  >  (Un) Subscribe thread alerts  
Subject:Loop infinite
Summary:Loop Infinite
Messages:8
Author:Francisco
Date:2013-07-29 13:24:07
Update:2013-07-30 21:36:59
 

  1. Loop infinite   Reply   Report abuse  
Picture of Francisco Francisco - 2013-07-29 13:24:08
I'm trying to test the class, but with all account is the same, stay in a infinite loop.

I don't know why because don't get any message error.


  2. Re: Loop infinite   Reply   Report abuse  
Picture of Andy Dixon Andy Dixon - 2013-07-29 19:45:07 - In reply to message 1 from Francisco
Hi,

Are you accessing a very large mailbox? If you are, it can take time to read and process the contents.

It took about 45 secs for me to process 1.5gb of mail..

  3. Re: Loop infinite   Reply   Report abuse  
Picture of Francisco Francisco - 2013-07-29 20:46:29 - In reply to message 2 from Andy Dixon
is more than 45 sec... and i try with a wrong password and stay in the loop again.

:/

  4. Re: Loop infinite   Reply   Report abuse  
Picture of Andy Dixon Andy Dixon - 2013-07-29 20:53:42 - In reply to message 3 from Francisco
Hi,

It'd you want to share your code with me, I can take a look for you?

andy at Dixon dot Io

  5. Re: Loop infinite   Reply   Report abuse  
Picture of Francisco Francisco - 2013-07-30 12:54:04 - In reply to message 4 from Andy Dixon
is the same .. any change i'm tryng with example.php


<?php

require_once 'getEmail.class.php';

$email = new processEmail();

$email->server = "{imap.gmail.com:993/imap/ssl/novalidate-cert}";

/**
* Your login details go here
*/
$email->login = "dpai.procesos@gmail.com";
$email->password = "utalca2013564866";

/**
* If you want to delete emails after getting them, set this to true - ideal for a ticketing system
*/
$email->deleteAfterRetr = false;

/**
* Test the connection before hand
*/
try {
$valid = $email->testConnection(); // Test the connection
} catch (processEmailException $e) {
die('ERROR: ' . $e->getMessage());
}

try {
if ($valid) { // So everything is okay with the connection
$email->connect();
$email->getMessages();
}

} catch (processEmailException $e) {
die('ERROR: ' . $e->getMessage());
}

// Quick and dirty output to show the example

?>

  6. Re: Loop infinite   Reply   Report abuse  
Picture of Andy Dixon Andy Dixon - 2013-07-30 13:19:47 - In reply to message 5 from Francisco
Hi,

Your example doesnt do anything with the messages, so you will just get a blank page.

I have tested it here:

dixon.io/_testbed/francisco.php

..and it errors. If you can contact me directly with your password, I can test it further for you, as long as you trust me with it.

Failing that, remove the closing php statement at the end of the file (you dont need it) and add:

print_r($email->messages);

  7. Re: Loop infinite   Reply   Report abuse  
Picture of Francisco Francisco - 2013-07-30 21:20:37 - In reply to message 6 from Andy Dixon
that password was correct now i'll change.

about the output i use all example i only copy the php script not html.

i really didn't know what's the problem, this script will be so helpfully for a project.

  8. Re: Loop infinite   Reply   Report abuse  
Picture of Andy Dixon Andy Dixon - 2013-07-30 21:36:59 - In reply to message 7 from Francisco
I'm certainly happy to give you a hand to get it working for you..
The class was originally used as part of a ticketing system, so it should work fine.
If you use Skype, we can message with that? My user is ajdixon0283