Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Mail Server
  • Search

I can't used php by imap_open for get all message in mail account from vesta cp

Questions regarding the Mail Server
Dovecot, Exim, RoundCube
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
wavesico
Posts: 3
Joined: Tue Aug 23, 2022 6:03 pm

Os: CentOS 7x
Web: nginx + php-fpm
I can't used php by imap_open for get all message in mail account from vesta cp
  • Quote

Post by wavesico » Thu Sep 01, 2022 9:08 pm

I can't used php for get all message in mail account from vesta cp

I used to php for get all massage in mail account as json from vesta cp but don't work it. How can I fix it ?

by imap_open

Code: Select all

<?php

    $imap = imap_open("{cordrr.tk:143/imap/tls}INBOX", "[email protected]", "admin");
    $headers = imap_headers($imap);

    if (!$headers) {
        print "Failed to retrieve headers\n";
    } else {
        foreach($headers as $header) {
            print "$header\n";
        }
    }

    imap_close($imap);
?>
Notice: Unknown: Can't connect to sev.cordrr.tk,143: Timed out (errflg=2) in Unknown on line 0
Top

nehavilash
Posts: 12
Joined: Sat Jul 15, 2023 9:33 am
Contact:
Contact nehavilash
Website Facebook Twitter

Os: CentOS 7x
Web: apache + nginx
Re: I can't used php by imap_open for get all message in mail account from vesta cp
  • Quote

Post by nehavilash » Wed Jul 19, 2023 2:46 pm

Check that the PHP IMAP extension is installed and enabled on your server.
Check it on

Code: Select all

<?php
phpinfo();
?>
if yes then test if your server can connect to the mail server using telnet.

Code: Select all

telnet sev.cordrr.tk 143
I'm hoping above steps find you to determine the way out of this.
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Mail Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password