Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: unable to connect to gmail server Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
hrzrahimi
Newbie
Newbie


Joined: 12 October 2014
Location: Iran
Online Status: Offline
Posts: 1
Posted: 12 October 2014 at 4:35am | IP Logged Quote hrzrahimi

Hi all
I install webmail in xampp and set the mail setting follow bellow:

Incoming login : example@gmail.com
Incoming mail : imap.gmail.com port : 993
Outgoing login : example@gmail.com
Outgoing mail : smtp.gmail.com port : 587

but I have an error that said : "Can't connect to mail server"

how can I solve this problem ?
Back to Top View hrzrahimi's Profile Search for other posts by hrzrahimi
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 12 October 2014 at 9:40am | IP Logged Quote Alex

Any debug should start with enabling log file. Enable logging at debug level in System/Logging, try again, and check the log file for more information.

Also, make sure you can telnet the given host and port from the server machine (to make sure the issue isn't related with the server, not with WebMail Pro).

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
rino88au
Newbie
Newbie


Joined: 16 October 2014
Online Status: Offline
Posts: 24
Posted: 17 October 2014 at 5:48am | IP Logged Quote rino88au

I'm having the same problem "Can't connect to mail server" when I try to connect to gmail.

Here is a copy of the log:

#0 ../libraries/afterlogic/common/managers/webmail/manager.php(142): CApiUsersManager->CreateAccount(Object(CAccount), true)
#1 ../libraries/afterlogic/common/managers/integrator/manager.php(776): CApiWebmailManager->CreateAccountProcess('r****67@gmai...', 'p*******c', '', Array)
#2 ../libraries/ProjectSeven/Actions.php(2499): CApiIntegratorManager->LoginToAccount('r****67@gmai...', 'p*******c', '', '')
#3 [internal function]: ProjectSeven\Actions->AjaxLogin()
#4 ../libraries/ProjectSeven/Service.php(252): call_user_func(Array)
#5 ../libraries/ProjectSeven/Boot.php(5): ProjectSeven\Service->Handle()
#6 ../index.php(80): include('/home3/webmail55...')
#7 {main}
[12:33:20.87][2b4b3727] Event: r****67@gmail.com > login-failed
[12:33:20.87][2b4b3727] exception 'CApiManagerException' with message 'Can't connect to mail server' in ../libraries/afterlogic/common/managers/users/manager.php:467
Stack trace:
#0 ../libraries/afterlogic/common/managers/webmail/manager.php(142): CApiUsersManager->CreateAccount(Object(CAccount), true)
#1 ../libraries/afterlogic/common/managers/integrator/manager.php(776): CApiWebmailManager->CreateAccountProcess('r****67@gmai...', 'p*******c', '', Array)
#2 ../libraries/ProjectSeven/Actions.php(2499): CApiIntegratorManager->LoginToAccount('r****67@gmai...', 'p*******c', '', '')
#3 [internal function]: ProjectSeven\Actions->AjaxLogin()
#4 ../libraries/ProjectSeven/Service.php(252): call_user_func(Array)
#5 ../libraries/ProjectSeven/Boot.php(5): ProjectSeven\Service->Handle()
#6 ../index.php(80): include('/home3/webmail55...')
#7 {main}
Back to Top View rino88au's Profile Search for other posts by rino88au
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6044
Posted: 17 October 2014 at 5:50am | IP Logged Quote Igor

To determine what's causing this, complete log is required. Please make sure log verbosity is set to Debug. You can send us logs privately via HelpDesk.

Also, please let us know the version of PHP you currently run. Thanks.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
rino88au
Newbie
Newbie


Joined: 16 October 2014
Online Status: Offline
Posts: 24
Posted: 17 October 2014 at 6:25am | IP Logged Quote rino88au

Here is a copy of a complete log as requested:

The running PHP version is 5.4.24

///////////////////////////////////////////////////////
[13:01:55.37][f69f2f95] Location: index.php

[13:01:55.76][6dfc8c4a] [GET][ip:1*7.**.**.**] /webmail55/adminpanel/index.php
[13:01:55.76][6dfc8c4a] POST > []
[13:01:55.76][6dfc8c4a]
[13:01:55.76][6dfc8c4a] call CCommonModule->PopulateData->SystemLogging()
[13:01:55.76][6dfc8c4a] call CWebMailModule->PopulateData->SystemLogging()

[13:01:59.68][f83e34b6] [POST(6)][ip:1*7.**.**.**] /webmail55/index.php?/Ajax/
[13:01:59.68][f83e34b6] POST > [Action, Email, IncLogin, IncPassword, SignMe, Token]
[13:01:59.68][f83e34b6]
[13:01:59.68][f83e34b6] AJAX: Action: Login
[13:01:59.68][f83e34b6] DB(PDO/mysql) : start connect to visco_extra@localhost
[13:01:59.68][f83e34b6] DB : PDO(mysql:dbname=visco_test;host=localhost;charset=utf8)
[13:01:59.69][f83e34b6] DB : connected to visco_extra@localhost
[13:01:59.69][f83e34b6] DB[1] > SELECT `id_acct`, `id_user`, `id_domain`, `id_tenant`, `deleted`, `def_acct`, `mailing_list`, `quota`, `email`, `friendly_nm`, `mail_protocol`, `mail_inc_host`, `mail_inc_port`, `mail_inc_login`, `mail_inc_pass`, `mail_inc_ssl`, `mail_out_host`, `mail_out_port`, `mail_out_login`, `mail_out_pass`, `mail_out_auth`, `mail_out_ssl`, `hide_in_gab`, `signature`, `signature_type`, `signature_opt`, `custom_fields` FROM awm_accounts WHERE `def_acct` = 1 AND `email` = 'r****67@gmail.com'
[13:01:59.69][f83e34b6] DB[2] > SELECT `id_domain`, `id_tenant`, `disabled`, `name`, `url`, `override_settings`, `is_internal`, `site_name`, `lang`, `def_user_timezone`, `def_user_timeformat`, `def_user_dateformat`, `allow_registration`, `allow_pass_reset`, `allow_webmail`, `mail_protocol`, `mail_inc_host`, `mail_inc_port`, `mail_inc_ssl`, `mail_out_host`, `mail_out_port`, `mail_out_auth`, `mail_out_login`, `mail_out_pass`, `mail_out_ssl`, `mail_out_method`, `check_interval`, `skin`, `msgs_per_page`, `allow_change_interface_settings`, `allow_change_account_settings`, `allow_users_add_acounts`, `allow_new_users_register`, `allow_open_pgp`, `layout`, `xlist`, `use_threads`, `allow_contacts`, `contacts_per_page`, `global_addr_book`, `allow_calendar`, `cal_show_weekends`, `cal_workday_starts`, `cal_workday_ends`, `cal_show_workday`, `cal_week_starts_on`, `cal_default_tab`, `allow_files`, `allow_helpdesk` FROM awm_domains WHERE `name` = 'gmail.com'
[13:01:59.69][f83e34b6] DB[3] > SELECT COUNT(id_acct) as acct_count FROM awm_accounts
WHERE def_acct = 1 AND `email` = 'r****67@gmail.com' AND `mail_inc_login` = 'r****67@gmail.com' LIMIT 1
[13:01:59.70][f83e34b6] IMAP[NOTE]: Start connection to "ssl://imap.gmail.com:993"
[13:02:19.72][f83e34b6] PHP[NOTICE]: /home3/webmail55/libraries/MailSo/Net/NetClient.php [line:221, code:2]
[13:02:19.72][f83e34b6] PHP[NOTICE]: Error: fsockopen(): unable to connect to ssl://imap.gmail.com:993 (Connection timed out)
[13:02:19.72][f83e34b6] IMAP[NOTICE]: exception 'MailSo\Net\Exceptions\SocketCanNotConnectToHostException' with message 'Can't connect to host "ssl://imap.gmail.com:993"' in /home3/webmail55/libraries/MailSo/Net/NetClient.php:226
Stack trace:
#0 /home3/webmail55/libraries/MailSo/Imap/ImapClient.php(141): MailSo\Net\NetClient->Connect('imap.gmail.com', 993, 1)
#1 /home3/webmail55/libraries/afterlogic/common/managers/users/manager.php(412): MailSo\Imap\ImapClient->Connect('imap.gmail.com', 993, 1)
#2 /home3/webmail55/libraries/afterlogic/common/managers/webmail55/manager.php(142): CApiUsersManager->CreateAccount(Object(CAccount), true)
#3 /home3/webmail55/libraries/afterlogic/common/managers/integrator/manager.php(776): CApiWebmailManager->CreateAccountProcess('r****67@gmai...', 'p*******c', '', Array)
#4 /home3/webmail55/libraries/ProjectSeven/Actions.php(2499): CApiIntegratorManager->LoginToAccount('r****67@gmai...', 'p*******c', '', '')
#5 [internal function]: ProjectSeven\Actions->AjaxLogin()
#6 /home3/webmail55/libraries/ProjectSeven/Service.php(252): call_user_func(Array)
#7 /home3/webmail55/libraries/ProjectSeven/Boot.php(5): ProjectSeven\Service->Handle()
#8 /home3/webmail55/index.php(80): include('/home3/wemail...')
#9 {main}
[13:02:19.72][f83e34b6] Exception[1011]: Can't connect to mail server
~ /libraries/afterlogic/common/managers/users/manager.php (467)
----------------------------------------------------------------------
#0 /home3/webmail55/libraries/afterlogic/common/managers/webmail55/manager.php(142): CApiUsersManager->CreateAccount(Object(CAccount), true)
#1 /home3/webmail55/libraries/afterlogic/common/managers/integrator/manager.php(776): CApiWebmailManager->CreateAccountProcess('r****67@gmai...', 'p*******c', '', Array)
#2 /home3/webmail55/libraries/ProjectSeven/Actions.php(2499): CApiIntegratorManager->LoginToAccount('r****67@gmai...', 'p*******c', '', '')
#3 [internal function]: ProjectSeven\Actions->AjaxLogin()
#4 /home3/webmail55/libraries/ProjectSeven/Service.php(252): call_user_func(Array)
#5 /home3/webmail55/libraries/ProjectSeven/Boot.php(5): ProjectSeven\Service->Handle()
#6 /home3/webmail55/index.php(80): include('/home3/wemail...')
#7 {main}
[13:02:19.72][f83e34b6] Exception[1011]: Can't connect to mail server
~ /libraries/afterlogic/common/managers/users/manager.php (467)
----------------------------------------------------------------------
#0 /home3/webmail55/libraries/afterlogic/common/managers/webmail55/manager.php(142): CApiUsersManager->CreateAccount(Object(CAccount), true)
#1 /home3/webmail55/libraries/afterlogic/common/managers/integrator/manager.php(776): CApiWebmailManager->CreateAccountProcess('r****67@gmai...', 'p*******c', '', Array)
#2 /home3/webmail55/libraries/ProjectSeven/Actions.php(2499): CApiIntegratorManager->LoginToAccount('r****67@gmai...', 'p*******c', '', '')
#3 [internal function]: ProjectSeven\Actions->AjaxLogin()
#4 /home3/webmail55/libraries/ProjectSeven/Service.php(252): call_user_func(Array)
#5 /home3/webmail55/libraries/ProjectSeven/Boot.php(5): ProjectSeven\Service->Handle()
#6 /home3/webmail55/index.php(80): include('/home3/wemail...')
#7 {main}
[13:02:19.72][f83e34b6] exception 'CApiManagerException' with message 'Can't connect to mail server' in /home3/webmail55/libraries/afterlogic/common/managers/users/manager.php:467
Stack trace:
#0 /home3/webmail55/libraries/afterlogic/common/managers/webmail55/manager.php(142): CApiUsersManager->CreateAccount(Object(CAccount), true)
#1 /home3/webmail55/libraries/afterlogic/common/managers/integrator/manager.php(776): CApiWebmailManager->CreateAccountProcess('r****67@gmai...', 'p*******c', '', Array)
#2 /home3/webmail55/libraries/ProjectSeven/Actions.php(2499): CApiIntegratorManager->LoginToAccount('r****67@gmai...', 'p*******c', '', '')
#3 [internal function]: ProjectSeven\Actions->AjaxLogin()
#4 /home3/webmail55/libraries/ProjectSeven/Service.php(252): call_user_func(Array)
#5 /home3/webmail55/libraries/ProjectSeven/Boot.php(5): ProjectSeven\Service->Handle()
#6 /home3/webmail55/index.php(80): include('/home3/wemail...')
#7 {main}

Next exception 'ProjectSeven\Exceptions\ClientException' with message 'ClientException' in /home3/webmail55/libraries/ProjectSeven/Actions.php:2538
Stack trace:
#0 [internal function]: ProjectSeven\Actions->AjaxLogin()
#1 /home3/webmail55/libraries/ProjectSeven/Service.php(252): call_user_func(Array)
#2 /home3/webmail55/libraries/ProjectSeven/Boot.php(5): ProjectSeven\Service->Handle()
#3 /home3/webmail55/index.php(80): include('/home3/wemail...')
#4 {main}
[13:02:19.72][f83e34b6] INFO[MEMORY]: Memory peak usage: 8.5MB
[13:02:19.72][f83e34b6] INFO[TIME]: Time delta: 20.147548913956
[13:02:19.72][f83e34b6] DB : disconnect from visco_extra@localhost

[13:02:26.94][75627405] [GET][ip:1*7.**.**.**] /webmail55/adminpanel/index.php?pop&type=dllog
[13:02:26.94][75627405] POST > []
[13:02:26.94][75627405]
[13:02:26.94][75627405] call CCommonModule->StandardPopAction->System()
[13:02:26.94][75627405] call CWebMailModule->StandardPopAction->System()
/////////////////////////////////////////////////////
Back to Top View rino88au's Profile Search for other posts by rino88au
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6044
Posted: 17 October 2014 at 6:33am | IP Logged Quote Igor

Thanks. The following extract of the logs:

Code:
[13:01:59.70][f83e34b6] IMAP[NOTE]: Start connection to "ssl://imap.gmail.com:993"
[13:02:19.72][f83e34b6] PHP[NOTICE]: /home3/webmail55/libraries/MailSo/Net/NetClient.php [line:221, code:2]


states that WebMail wasn't able to establish network connection to that server during 20 seconds, so the connection was aborted due to timeout. That's networking issue unrelated to our product, maybe the particular port is blocked on server. If you run the product on shared hosting of some kind, you might want to check this with your host, maybe they're blocking particular ports for some reason.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
rino88au
Newbie
Newbie


Joined: 16 October 2014
Online Status: Offline
Posts: 24
Posted: 17 October 2014 at 7:04am | IP Logged Quote rino88au

I have just contact my hosting company and I have been told that the following:

it is not blocked on the server, ports 26, 110, 143, 465, 587, 993, and 995 are all open mail ports.

What else it could be ?
Back to Top View rino88au's Profile Search for other posts by rino88au
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6044
Posted: 17 October 2014 at 7:21am | IP Logged Quote Igor

No idea really, but we can suggest running a sample script designed specifically to test connection with GMail IMAP or other SSL-enabled mail servers. Unpack the script to your web directory, run it from the browser and check the output you get.

Note the script holds $timeout value set to 40 seconds, which is twice more than standard timeout value used in WebMail Pro; there is a chance that tweaking that value might help.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
rino88au
Newbie
Newbie


Joined: 16 October 2014
Online Status: Offline
Posts: 24
Posted: 17 October 2014 at 7:51am | IP Logged Quote rino88au

Thanks for the script.

Still the same issue "time out"

Can you please verify if gmail works on your end via webmail lite?

If it works, please verify gmail "forwarding and POP/IMAP" settings.


Thanks
Back to Top View rino88au's Profile Search for other posts by rino88au
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6044
Posted: 17 October 2014 at 7:56am | IP Logged Quote Igor

It definitely works for us, I personally use GMail with our WebMail a lot. Actually, the script holds the basic PHP functionality for establish network connection, so the problem is definitely on web server end, it's unrelated to GMail or WebMail Pro.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
rino88au
Newbie
Newbie


Joined: 16 October 2014
Online Status: Offline
Posts: 24
Posted: 17 October 2014 at 8:07am | IP Logged Quote rino88au

Ok, I have just moved to different server and I can confirm that your script works good with gmail!

Thanks
Back to Top View rino88au's Profile Search for other posts by rino88au
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide