Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: How to open a message by permanent ID? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
madin
Newbie
Newbie


Joined: 02 May 2017
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 02 May 2017 at 1:42am | IP Logged Quote madin

Hi there!

I need to send link to the message to other people in my company. And I want to be sure that they open exactly the same message that I want to send.

I can't figure out how I should write a permanent link to my message.

The url of the page with the inbox list of messages looks like this /mail/#mailbox/inbox/msg7540

The problem is that when the message is located not at the first page this url doesn't work because now you should add to url a number of page:
/mail/#mailbox/inbox --> /p2/ <-- /msg7540

Is there way to open any message by permanent ID?
He could look like this /mail/#mailbox/inbox/ID/2312347230
Where '2312347230' is the constant ID of message.
Back to Top View madin's Profile Search for other posts by madin
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 02 May 2017 at 1:48am | IP Logged Quote Igor

Hello,

I'll check this with the developers, but first, I have a question: when sharing a message that way, do you assume people will be logged into your email account? Otherwise, that's not going to work I'm afraid.

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


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 02 May 2017 at 1:50am | IP Logged Quote Igor

Also, there's a way to open message in a full window, without list of mails and folders:

/#single-message-view/INBOX/msg7540

Would that work for you?

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


Joined: 02 May 2017
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 02 May 2017 at 2:21am | IP Logged Quote madin

Thanks a lot for quick response, Igor!

We have one special email account for all employees and use code to automation login to this account. We try to integrate the webmail into our web-application using autologin with php:

=== cut ===
$oApiIntegratorManager = CApi::Manager('integrator');
$oAccount = $oApiIntegratorManager->loginToAccount($sEmail, $sPassword);
$oApiIntegratorManager->setAccountAsLoggedIn($oAccount);
CApi::Location('/afterlogic/#single-message-view/dispatched/msg'.$uid);
=== cut ===

As you can see, the last line of code redirects us to 'afterlogic/#single-message-view/...' page. And we get the following error in browser console:

=== cut ===
Uncaught TypeError: Cannot read property 'getAccounts' of undefined
=== cut ===

Permanent link to single-message-view works only after visiting '/afterlogic/#mailbox/...' page in browser. But we cannot redirect user to #mailbox first, we lose control on browser in this case and can't force second redirect.
Back to Top View madin's Profile Search for other posts by madin
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 02 May 2017 at 3:28am | IP Logged Quote Igor

I've just checked this on my test installation of WebMail Pro, and the approach with opening single-message-view worked like a charm, no errors of any kind. The error message you're getting is probably caused by something else; are you getting the same error if you replace CApi::Location call with this one?

Code:
CApi::Location('/afterlogic/');


Also, please make sure you're using the latest 7.7 version, there could have been issues with this method in older versions.

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


Joined: 02 May 2017
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 02 May 2017 at 5:40am | IP Logged Quote madin

Thanks a lot!

I'll try to do this.
Back to Top View madin's Profile Search for other posts by madin
 
pstrabykin
Newbie
Newbie
Avatar

Joined: 02 May 2017
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 02 May 2017 at 9:23am | IP Logged Quote pstrabykin

Hello Igor!
Thank you for help.
We are using WebMail Pro 7.7.2 on Debian 8 Linux.
We don't get any errors in console if we replace the last line to

Code:

CApi::Location('/afterlogic/');


The error can be reproduced in new incognito browser window if you don't visit any other webmail pages before going to single-message-view.

Code:

Uncaught TypeError: Cannot read property 'getAccounts' of undefined
    at AppMain.AppBase.run (app.min.js?772:28)
    at app.min.js?772:28
    at libs.js?772:11


We tried the latest WebMail Lite now and get the same problem.
Back to Top View pstrabykin's Profile Search for other posts by pstrabykin
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 03 May 2017 at 6:30am | IP Logged Quote Igor

We'll have this investigated and will get back to you.

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


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 03 May 2017 at 8:37am | IP Logged Quote Igor

I think we have an idea as to what could be causing this. Please backup your copy of static/js/app.min.js file and replace it with the file from this package. Be sure to clear web browser cache.

Please let us know if this helps you. Thanks!

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


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 03 May 2017 at 8:46am | IP Logged Quote Igor

Please disregard that last one; we've reproduced the problem (which seems to occur if WebMail window is opened from within another page) and the suggested patch doesn't seem to help. Developers are looking into this, we'll keep you posted.

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


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 04 May 2017 at 3:48am | IP Logged Quote Igor

OK I believe this is now fixed, please try this build of static/js/app.min.js file and let us know if it works for you.

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

Joined: 02 May 2017
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 04 May 2017 at 9:47am | IP Logged Quote pstrabykin

Thank you Igor,
we'll try this build in a few days and write the result here.
Back to Top View pstrabykin's Profile Search for other posts by pstrabykin
 
pstrabykin
Newbie
Newbie
Avatar

Joined: 02 May 2017
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 22 May 2017 at 1:51am | IP Logged Quote pstrabykin

Hello Igor,
the build you provided works perfectly. Thank you!
Back to Top View pstrabykin's Profile Search for other posts by pstrabykin
 

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