Author |
|
RobFoster Newbie
Joined: 13 December 2005 Location: Canada
Online Status: Offline Posts: 18
|
Posted: 02 January 2006 at 2:35pm | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 02 January 2006 at 6:26pm | IP Logged
|
|
|
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 |
|
|
RobFoster Newbie
Joined: 13 December 2005 Location: Canada
Online Status: Offline Posts: 18
|
Posted: 10 January 2006 at 5:24pm | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 11 January 2006 at 9:16am | IP Logged
|
|
|
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:
Regards,
Alex
|
Back to Top |
|
|