Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: Check E-Mail From Another Page Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
RobFoster
Newbie
Newbie


Joined: 13 December 2005
Location: Canada
Online Status: Offline
Posts: 18
Posted: 02 January 2006 at 2:35pm | IP Logged Quote RobFoster

Is there a fast way to check if the user has any new e-mail's from another page? I have removed all the graphics from the get_mail.asp and renamed it to check_mail.asp however I want it to check for new messages everytime they reload the page. Since I have added this the load time on each page now is over 15 seconds. Is there a faster way to check for new messages?
Back to Top View RobFoster's Profile Search for other posts by RobFoster
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 02 January 2006 at 6:26pm | IP Logged Quote Alex

Maybe, your mail server (or particular account) is very slow? For instance, with our mail server, even get_mail.asp with all its graphics and javascript loads in 2-3 seconds (if no new mails have been detected).

And how many messages are in mail server's inbox and in WebMail's inbox you're checking?

If the account contains many thousands mails on the mail server or in the database, new mails check may really take 15 seconds or so. Please check if the same occurs with the account containing not so many mails.

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


Joined: 13 December 2005
Location: Canada
Online Status: Offline
Posts: 18
Posted: 10 January 2006 at 5:24pm | IP Logged Quote RobFoster

Sorry for the delay in my response. If the account has not e-mail it takes 10 seconds or so, but if it has mail it takes much longer. Any ideas on how I can just check and see if the mail is there WITHOUT downloading the messages?
Back to Top View RobFoster's Profile Search for other posts by RobFoster
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 11 January 2006 at 9:16am | IP Logged Quote Alex

You can use GetMailAtLogin(id_user) or GetMailAtLoginByEmail(str_email) function (both declared in functions_main.inc.asp) for this. These functions return True if not yet downloaded mails are available and "Get Mails At Login" is True.

To make this functions "Get Mails At Login"-invariant, you can modify them as shown below. Replace this:
Code:

        blnGetMailAtLogin = False
        sql = "SELECT bool_getmail_at_login FROM wm_users WHERE id_user=" &
DataEncodeNumeric(intIdUser)
        Set objRStmp = objConn.Execute(sql)
        Do While Not objRStmp.EOF
                 blnGetMailAtLogin = objRStmp(0).Value
                 objRStmp.MoveNext
        Loop
        objRStmp.Close
        Set objRStmp = Nothing

with this:
Code:

blnGetMailAtLogin = True


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

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