Set log content property of send email widget dynamically

The "Log Content" property of the "Send Email" widget can only be set to either "Yes" or "No" in design time. It would be desirable to set this property dynamically via a Site Property so that it can be set via Service Center without the need to modify the source code every time just to set the logging on or off. 

This way one could set the property to either true or false per environment (Development, Test, or Production). It is desirable to have the email logging switched on for the Development- and Test-environments but not for the Production-Environment.

Can this be done dynamically?

Rank: #157

Hello Chris,

Why don't you use an If widget (based on a Site Property) and 2 Send Email widgets?

Something like this:

Basically, you have a Site Property called LogContent (boolean) or something similar. If it is true, you call the SendEmail widget with the Log Content set to Yes. If not, you call the SendEmail widget with the same variables, but with the Log Content property set to No.

Kind regards,

Rui Barradas

Rank: #157

Exactly Chris :)

In this case, you will have 2 Send Email widgets (one with Log Content set to Yes and another with Log Content set to No) and the Site Property will control which one is going to execute :)

Glad that I could help you!

Kind regards,

Rui Barradas