Skip to content
This repository has been archived by the owner on Nov 14, 2019. It is now read-only.

problem with imap_open #25

Closed
ickbinhier opened this issue May 29, 2017 · 4 comments
Closed

problem with imap_open #25

ickbinhier opened this issue May 29, 2017 · 4 comments
Assignees

Comments

@ickbinhier
Copy link
Contributor

in class Handler in function openImapRemote line 295

I get some error messages when calling imap_open.

'imap_open(): Couldn't open stream {xxxx.tu-braunschweig.de:993/imap/ssl/validate-cert}INBOX', '/var/www-aaaa/releases/111/vendor/crazy-max/cws-mail-bounce-handler/lib/Cws/MailBounceHandler/Handler.php', 299, array('opts' => '/imap/ssl/validate-cert')

I have already placed the call to openImapRemote in a try catch.

Does it make sense to use a try catch in the openImapRemote function?

@ickbinhier
Copy link
Contributor Author

Does the Pull Request #26 sense?

@crazy-max
Copy link
Owner

Hi,

Can you paste here your code while opening an imap remote plz ?
Thanks

@crazy-max crazy-max self-assigned this May 29, 2017
@ickbinhier
Copy link
Contributor Author

    try {
        $em = $this->getContainer()->get('doctrine.orm.entity_manager');

        $cwsDebug = new CwsDebug();
        $cwsDebug->setQuietVerbose();
        $cwsDebug->setEchoMode();

        $cwsMbh = new Handler($cwsDebug);
        $cwsMbh->setDeleteProcessMode();


        $cwsMbh->setImapMailboxService();
        $cwsMbh->setMailboxHost('xxxx.tu-braunschweig.de');
        $cwsMbh->setMailboxSecurity(Handler::MAILBOX_SECURITY_SSL);
        $cwsMbh->setMailboxCertValidate();
        $cwsMbh->setMailboxPort(Handler::MAILBOX_PORT_IMAP_TLS_SSL);
        $cwsMbh->setMailboxUsername('i0000001');
        $cwsMbh->setMailboxPassword('i0000001');
        $cwsMbh->setMailboxName('INBOX');

        if ($cwsMbh->openImapRemote() === false) {
            if ($output->isVerbose()) {
                $output->writeln($cwsMbh->getError());
            }
            return false;
        }

        $result = $cwsMbh->processMails();

.
.
.
.
} catch (Exception $e) {
return false;
}

@crazy-max
Copy link
Owner

Solved in 1.11

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants