|
Using the Telligent.Tasks service to send CommunityServer Emails |
|
Telligent has a Windows Service job which can be run to offload some of the Tasks / Job processing from your web server... The most common configuration is to use the task server for running the Enterprise Search Indexing jobs, although you could use it to do your Search Barrel Indexing as well...
The second most common item is to use the tasks service to send outgoing emails... Communityserver queues emails into the SQL database by default, and uses a "job" to send them.
The key to using the Telligent tasks service for a job that normally runs under the web site is setting up the CommunityServer "context" in the task service...
This involves copying a few items your cs site folders, into the tasks service folder:
- languages folder (and its sub folders)
- siteurls.config
- communityserver.config
- connectionstrings.config
- dlls from your web/bin folder
It is not necessary to remove any tasks from your communityserver.config, as the tasks service loads its task list from the tasks.config file...
Finally you need to edit the tasks.config to set up the cs context object for your site.. To the tasks.config file
Add to the \tasks node:
<Sites>
<add name="[AppName from your aspnet_Applications table] " siteUrl="[site url without http://]" />
</Sites>
and
<Modules>
<add name="SiteSettingsModule" type="Telligent.Tasks.CommunityServer.SiteSettingsModule, Telligent.Tasks.CommunityServer" />
<add name="ServiceTaskModule" type="Telligent.Tasks.ServiceTaskModule, Telligent.Tasks" />
</Modules>
and then you should be able to configure the email task by adding a thread to the \tasks\threads node
<Thread minutes="5">
<task name = "Emails" type = "CommunityServer.MailRoom.Components.EmailJob, CommunityServer.MailGateway.MailRoom" enabled = "true" enableShutDown = "false" failureInterval = "1" numberOfTries = "10" />
</Thread>
This will use the SMTP server set in your database (its set via the administration section of the CommunityServer Control Panel / Settings / Email Settings; and send your emails to the SMTP server every 5 minutes.
Dan
Attachment(s): Telligent.Tasks.CommunityServer.zip