Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: Check email automatically after logging i Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
xyptilon
Newbie
Newbie
Avatar

Joined: 10 April 2008
Location: Netherlands
Online Status: Offline
Posts: 10
Posted: 10 April 2008 at 2:27am | IP Logged Quote xyptilon

The subject says it all, how can i have email checked automatically after a succesful login without our users having to manually press the "check email" button?

Thanks, using webmail pro 4.1

Sincerely,
- Wouter
Back to Top View xyptilon's Profile Search for other posts by xyptilon
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 10 April 2008 at 3:46am | IP Logged Quote Andrew

To set "get mail at login" for all new users (which will be created after this fix is applied), edit App_Code/Account.cs file, function LoginAccount (approx. line 404):

Code:
result = usr.CreateAccount(true, false, email, incomingMailProtocol, incomingMailServer, login, password, incomingPort, outgoingMailServer, string.Empty, string.Empty, outgoingMailPort, useSmtpAuthentication, "", true, DefaultOrder.DateDesc, false, MailMode.LeaveMessagesOnServer, 1, "", SignatureType.Plain, SignatureOptions.DontAddSignature, "/", 0, syncType, advanced_login);


replace with:

Code:
result = usr.CreateAccount(true, false, email, incomingMailProtocol, incomingMailServer, login, password, incomingPort, outgoingMailServer, string.Empty, string.Empty, outgoingMailPort, useSmtpAuthentication, "", true, DefaultOrder.DateDesc, true, MailMode.LeaveMessagesOnServer, 1, "", SignatureType.Plain, SignatureOptions.DontAddSignature, "/", 0, syncType, advanced_login);


To set this for all already existing accounts, please run the following SQL query in the WebMail Pro PHP database:

Code:
UPDATE awm_accounts SET getmail_at_login=1


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
xyptilon
Newbie
Newbie
Avatar

Joined: 10 April 2008
Location: Netherlands
Online Status: Offline
Posts: 10
Posted: 10 April 2008 at 8:57am | IP Logged Quote xyptilon

Thank you for your prompt response, in which file would that be for the PHP version?
Back to Top View xyptilon's Profile Search for other posts by xyptilon
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 11 April 2008 at 1:32am | IP Logged Quote Andrew

For WebMail Pro PHP, this is class_account.php file:

Code:
class Account
{

.....

        /**
         * @var bool
         */
        var $GetMailAtLogin = false;


You should change false to true there.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
xyptilon
Newbie
Newbie
Avatar

Joined: 10 April 2008
Location: Netherlands
Online Status: Offline
Posts: 10
Posted: 11 April 2008 at 8:28pm | IP Logged Quote xyptilon

It is working now.. Thanks.
Back to Top View xyptilon's Profile Search for other posts by xyptilon
 
siddharth
Newbie
Newbie
Avatar

Joined: 03 June 2008
Location: India
Online Status: Offline
Posts: 10
Posted: 17 June 2008 at 4:09am | IP Logged Quote siddharth

Don't i need to change the default value of getmail_at_login to 1 in the DB also? This is what i did:
Code:

mysql> ALTER TABLE awm_accounts ALTER COLUMN getmail_at_login SET DEFAULT 1;


Is this required/correct?
Back to Top View siddharth's Profile Search for other posts by siddharth
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 17 June 2008 at 4:14am | IP Logged Quote Andrew

Yes, this is correct, but wouldn't have any effect because default values are specified in the Account class.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
siddharth
Newbie
Newbie
Avatar

Joined: 03 June 2008
Location: India
Online Status: Offline
Posts: 10
Posted: 17 June 2008 at 5:17am | IP Logged Quote siddharth

Thank you very much indeed for the prompt and clear response!
Back to Top View siddharth's Profile Search for other posts by siddharth
 
john_lenon
Newbie
Newbie


Joined: 23 May 2011
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 23 May 2011 at 3:26am | IP Logged Quote john_lenon

Hi! How to remove automatically check after logging in for all accounts? Adnrew's solution does not work for me (account.cs is different in version 5).

Thanks, webmail pro asp.net 5
Back to Top View john_lenon's Profile Search for other posts by john_lenon
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6054
Posted: 23 May 2011 at 3:29am | IP Logged Quote Igor

john_lenon, do you use POP3 or IMAP? Also, what synchronization mode do you use for Inbox?

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


Joined: 23 May 2011
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 23 May 2011 at 3:55am | IP Logged Quote john_lenon

Hi, Igor, I'm using POP3 and Entire Messages for Inbox
Back to Top View john_lenon's Profile Search for other posts by john_lenon
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6054
Posted: 23 May 2011 at 6:34am | IP Logged Quote Igor

In Account.cs file, you'll see a number of lines like:

Code:
_getMailAtLogin = getmail_at_login;


and

Code:
_getMailAtLogin = true;


In all those lines, you need to place false instead:

Code:
_getMailAtLogin = false;


Even though the code located in App_Code directory is usually recompiled automatically, you might need to force the recompilation by running compile.bat file found in root WebMail Pro directory.

Hope this helps!

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


Joined: 23 May 2011
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 24 May 2011 at 12:32am | IP Logged Quote john_lenon

Thank you, Igor, it works, but only for new users, and I think that's enough for me. I'm going to reinstall the Webmail with your solution. Thanks again.
Back to Top View john_lenon's Profile Search for other posts by john_lenon
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6054
Posted: 24 May 2011 at 1:19am | IP Logged Quote Igor

For existing users, I believe the SQL query provided above should do the trick:

Code:
UPDATE awm_accounts SET getmail_at_login=1


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

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