We are trying to find a way to turn off the sending of emails from our Dev/Test blackpearl servers, as some test items are being sent to users and causing confusion. Is there a way to toggle that on/off?
Thanks,
DR
We are trying to find a way to turn off the sending of emails from our Dev/Test blackpearl servers, as some test items are being sent to users and causing confusion. Is there a way to toggle that on/off?
Thanks,
DR
Quite a few ways to achieve this, I tend to prefer option 1 as it's the most flexible and allows for application specific configuration as opposed to code changes as things move through the lifecycle, or server config file changes:
1. Typically I'll create a "ConfigValues" smartobject, that allows me to store values such as group names used in workflow destinations, and other environment specific configuration values. This typically looks something like (Key,Value), and a sample row would be something like (ExpenseClaim-Approval-Group,DenallixK2Developers)
This way, when I test the workflow, I can only notify the developers group. Once I move to QA, I'll update the row so it reads (ExpenseClaim-Approval-Group,DenallixQATestGroup)
In Production... (ExpenseClaim-Approval-Group,DenallixActualGroup)
This also makes it somewhat easy to change that group without having to make code changes in the future.
2. Another option, is to redirect all emails on the server to a folder on the local disk, which can be done via this configuration change in k2hostserver.exe
You can route all emails to a folder for all .NET based applications (including K2) that use the System.Net.Mail
classes for email. This can be useful when testing a process and not wanting to flood users with emails.
To do, add the following section to the K2Hostserver.config file:
<system.net>
<mailSettings>
<smtp deliveryMethod="SpecifiedPickupDirectory" from="*personal details removed*">
<specifiedPickupDirectory pickupDirectoryLocation="c:foo"/>
</smtp>
</mailSettings>
</system.net>
The System.Net.Mail classes that K2 blackpearl uses for sending emails will automatically use these settings in the
.config file if they exist. Specify the directory where you want your emails stored. Note, this will affect all emails
sent form K2 blackpearl.
Mike,
In option 2 that you posted, is that change made in the K2HostServer.exe.config file, or are you referring to a different one?
Thanks,
DR
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.