Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8430131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:31:31+00:00 2026-06-10T05:31:31+00:00

This is my code: $server = ‘{imap.gmail.com:993/ssl/novalidate-cert}’; $imap_connection = imap_open($server, $login, $password); $mailboxinfo =

  • 0

This is my code:

  $server = '{imap.gmail.com:993/ssl/novalidate-cert}';
  $imap_connection = imap_open($server, $login, $password);
  $mailboxinfo = imap_mailboxmsginfo($imap_connection);
  $messageCount = $mailboxinfo->Nmsgs;

Its throwing some errors .

Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/ssl/novalidate-cert} in /home2/booksby/public_html/anonymousemail.php on line 13

Googling suggests that the problem is due to some firewall issues. And my hosting provider is asking me which port does my php script uses.

So can someone tell me which port needs to opened for the above to work ? is it 993 ? Any way I can find out for sure ?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:31:33+00:00Added an answer on June 10, 2026 at 5:31 am

    AS IBM states in their documentation:

    Choose 143 (default) to use the industry standard port for IMAP
    connections over TCP/IP. You can specify a different port, but 143
    works in most situations. When specifying a nonstandard port, make
    sure the port is not reserved for another service. Port numbers can be
    any number from 1 to 65535.

    // To connect to an IMAP server running on port 143 on the local machine,
    // do the following:
    $mbox = imap_open("{localhost:143}INBOX", "user_id", "password");
    

    for further reference see this link of php manual

    as by @max

    143 is the default /insecure/ port for IMAP. In the wild, most servers require SSL, which is on port 993.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code for server code in c, under unix: /* A simple
Consider this code in a php file on my VPS server: <?php $url =
The code below is creating a server to communicate with clients.This code works fine
I use this code to connect to SQL Server 2012, but it does not
This code compiles, and runs successfully locally, but not on another server. Both machines
I am using this code to search data in SQL Server. But the result
I use this code to select password field from the sql server 2012 db,
So I run this Windows Server 2008 security update and this code block is
The purpose of this code is to pull upgrade.zip from a central server, extract
Can anyone help me debug this program? The following is server code : package

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.