GMAIL POP and IMAP

Helpdesk for my helpdesk software

Moderator: mkoch227

leigh
Posts: 18
Joined: Fri Nov 10, 2017 6:05 pm

GMAIL POP and IMAP

Post by leigh »

Script URL: Internal
What terms did you try when SEARCHING for a solution: email, gmail, pop3

Write your message below:

HESK version: 2.7.3 - HESK is up to date
PHP version: 7.1.11 (MySQLi)
MySQL version: 10.1.28-MariaDB
/hesk_settings.inc.php Exists, Writable
/attachments Exists, Writable
/cache Exists, Writable

I have encountered errors on POP3 on gmail and IMAP overall.

I can connect pop3 on other providers but on google it returns this every time:
I have been on chat with google to check everything is setup correctly on my account.

In Hesk i get this error:
Error: 0 could not connect to the host "pop.gmail.com":
Connecting to pop.gmail.com ...

Also it wont let me use IMAP on any provider it just errors out

I have tried a fresh install too.

Any help would be greatly appreciated
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: GMAIL POP and IMAP

Post by Klemen »

This error means that the ports you are trying to use are blocked in your firewall.

Make sure the server has those ports unblocked, both incoming and outgoing TCP traffic.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
leigh
Posts: 18
Joined: Fri Nov 10, 2017 6:05 pm

Re: GMAIL POP and IMAP

Post by leigh »

Ok I will try this its strange that I can use pop3 on outlook for example
just not google
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: GMAIL POP and IMAP

Post by Klemen »

So you can for example connect to outlook.office365.com (you get a different error like wrong authentication?) but not to pop.gmail.com with all other settings the same?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: GMAIL POP and IMAP

Post by Klemen »

One thing that comes to mind: it could be due to SSL certificate verification issue.

Try this:

1. download this file
2. save it somewhere to your server, for example to C:\wamp\ssl\cacert.pem
3. open your php.ini file
4. find line

Code: Select all

;openssl.cafile=
and change it to (don't forget to remove the ; at the beginning)

Code: Select all

openssl.cafile=C:\wamp\ssl\cacert.pem
5. save and restart the server
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
leigh
Posts: 18
Joined: Fri Nov 10, 2017 6:05 pm

Re: GMAIL POP and IMAP

Post by leigh »

I can connect and use any other pop service but not google
Thanks
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: GMAIL POP and IMAP

Post by Klemen »

Have you tried as suggested above?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
leigh
Posts: 18
Joined: Fri Nov 10, 2017 6:05 pm

Re: GMAIL POP and IMAP

Post by leigh »

I have tried this and its still the same only google pop has the problem
Also IMAP does not work for any provider, if i press test connections i get no results and if i save it does not save.
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: GMAIL POP and IMAP

Post by Klemen »

Try this:

1. open file inc/mail/pop3.php in Notepad++
2. find

Code: Select all

@fsockopen
and change it to

Code: Select all

fsockopen
3. save and test again
4. copy the error message log you get now when testing the POP3 connection and post it here

As for IMAP, probably blocked port 993 in firewall?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
leigh
Posts: 18
Joined: Fri Nov 10, 2017 6:05 pm

Re: GMAIL POP and IMAP

Post by leigh »

HI,
I have done this but get the same message

Error: 0 could not connect to the host "pop.gmail.com":

ports are open and firewall disabled for testing,

IT is the same for SMTP google.

And with IMAP when I press (Test IMAP connection)
It does not show any dialogue box

I have tested with another helpdesk ticket script and it works ok but I really like hesk to want to resolve this

Thanks,
Leigh
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: GMAIL POP and IMAP

Post by Klemen »

You get the same message, but is there anything else in the LOG (textarea) below the message?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
leigh
Posts: 18
Joined: Fri Nov 10, 2017 6:05 pm

Re: GMAIL POP and IMAP

Post by leigh »

No it does not show any information further in the log
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: GMAIL POP and IMAP

Post by Klemen »

In that case I am unfortunately out of ideas. You might want to consider using the other help desk software you say works fine on your server with Gmail.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
leigh
Posts: 18
Joined: Fri Nov 10, 2017 6:05 pm

Re: GMAIL POP and IMAP

Post by leigh »

Good news is that i have got SMTP and POP working but i have has to lower the version of PHP
I would like to fix this long term as I would like to higher the version of php.

The only issue i have left is that if i try use IMAP it just sits on (Testing connection, this can take a while...)
and never changes,
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: GMAIL POP and IMAP

Post by Klemen »

If a lower version of PHP works then it is indeed a SSL/TLS certificate verification issue.

IMAP hanging is usually due to port blocked, have you double-checked that?

However, note that you need either POP3 or IMAP, you don't need both.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply