Rank: Newbie
Groups: Registered
Joined: 8/27/2018(UTC)
Posts: 2
i tried to register the idle event hoping to receive a notification, but did not get any. Here is my code... what am i missing? Do we have any samples? MailServer oServer = new MailServer(_config.EmailServer, _config.EmailAccountName, _config.EmailAccountPasswrod, ServerProtocol.Imap4); my windows service has this code to register for event: MailClient oClient = new MailClient(_config.EaGetMailLicense); oServer.SSLConnection = true; oServer.Port = 993; oClient.Connect(oServer); oClient.OnIdle += new MailClient.OnIdleEventHandler(NewMessageReceived); public void NewMessageReceived(object source, ref bool cancel) { // Do something with the source... _logger.InfoFormat($"New {_config.ConfigurationName} Message notification: {source.ToString()}"); //ProcessMessages(); }
Rank: Administration
Groups: Administrators
Joined: 11/11/2010(UTC) Posts: 1,152
Thanks: 9 times Was thanked: 55 time(s) in 55 post(s)
Rank: Newbie
Groups: Registered
Joined: 8/27/2018(UTC)
Posts: 2
Ivan , Thanks for your response. How does the mailclient.WaitNewEmail(100) work? The documentation is not clear on whether it is using a polling or using IDLE command to get notification from server. if I use -1 to wait indefinitely I get issues with connection errors etc...
Rank: Administration
Groups: Administrators
Joined: 11/11/2010(UTC) Posts: 1,152
Thanks: 9 times Was thanked: 55 time(s) in 55 post(s)
It uses IDLE for IMAP4, URL notification for EWS, if it is -1, yes, it means Infinite.
Forum Jump
EmailArchitect Support
Email Component Development
- EASendMail SMTP Component - .NET Version
- EASendMail SMTP Component - Windows Store Apps
- EASendMail SMTP ActiveX Object
- EAGetMail POP3 & IMAP4 Component - .NET Version
- EAGetMail POP3 & IMAP4 ActiveX Object
Exchange Server and IIS SMTP Plugin
- DomanKeys/DKIM for Exchange Server and IIS SMTP
- Disclaimer and S/MIME for Exchange Server and IIS
EmailArchitect Email Server
- EmailArchitect Email Server (General)
- EmailArchitect Email Server Development
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.