Author |
|
xyptilon Newbie


Joined: 10 April 2008 Location: Netherlands
Online Status: Offline Posts: 10
|
Posted: 10 April 2008 at 2:27am | IP Logged
|
|
|
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 |
|
|
Andrew AfterLogic Support

Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 10 April 2008 at 3:46am | IP Logged
|
|
|
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 |
|
|
xyptilon Newbie


Joined: 10 April 2008 Location: Netherlands
Online Status: Offline Posts: 10
|
Posted: 10 April 2008 at 8:57am | IP Logged
|
|
|
Thank you for your prompt response, in which file would that be for the PHP version?
|
Back to Top |
|
|
Andrew AfterLogic Support

Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 11 April 2008 at 1:32am | IP Logged
|
|
|
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 |
|
|
xyptilon Newbie


Joined: 10 April 2008 Location: Netherlands
Online Status: Offline Posts: 10
|
Posted: 11 April 2008 at 8:28pm | IP Logged
|
|
|
It is working now.. Thanks.
|
Back to Top |
|
|
siddharth Newbie


Joined: 03 June 2008 Location: India
Online Status: Offline Posts: 10
|
Posted: 17 June 2008 at 4:09am | IP Logged
|
|
|
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 |
|
|
Andrew AfterLogic Support

Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 17 June 2008 at 4:14am | IP Logged
|
|
|
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 |
|
|
siddharth Newbie


Joined: 03 June 2008 Location: India
Online Status: Offline Posts: 10
|
Posted: 17 June 2008 at 5:17am | IP Logged
|
|
|
Thank you very much indeed for the prompt and clear response!
|
Back to Top |
|
|
john_lenon Newbie

Joined: 23 May 2011 Location: Russian Federation
Online Status: Offline Posts: 3
|
Posted: 23 May 2011 at 3:26am | IP Logged
|
|
|
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 |
|
|
Igor AfterLogic Support

Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6124
|
Posted: 23 May 2011 at 3:29am | IP Logged
|
|
|
john_lenon, do you use POP3 or IMAP? Also, what synchronization mode do you use for Inbox?
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
john_lenon Newbie

Joined: 23 May 2011 Location: Russian Federation
Online Status: Offline Posts: 3
|
Posted: 23 May 2011 at 3:55am | IP Logged
|
|
|
Hi, Igor, I'm using POP3 and Entire Messages for Inbox
|
Back to Top |
|
|
Igor AfterLogic Support

Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6124
|
Posted: 23 May 2011 at 6:34am | IP Logged
|
|
|
In Account.cs file, you'll see a number of lines like:
Code:
_getMailAtLogin = getmail_at_login; |
|
|
and
In all those lines, you need to place false instead:
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 |
|
|
john_lenon Newbie

Joined: 23 May 2011 Location: Russian Federation
Online Status: Offline Posts: 3
|
Posted: 24 May 2011 at 12:32am | IP Logged
|
|
|
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 |
|
|
Igor AfterLogic Support

Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6124
|
Posted: 24 May 2011 at 1:19am | IP Logged
|
|
|
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 |
|
|