There could be many options but the quickest and simplest that can be used is the Event System code.
Where you can catch appropriate workflow events and write C# code to send an email.
Regarding web.config, Tridion CME itself is an ASP.NET
based application and have its web.config
and you are not supposed to make changes for such requirements.
I would suggest you read the Tridion Architecture, its different module and their connectivity before jumping on to the code and you will save a lot on the maintenance thing.
You may think of keeping email ids in Tridion components, metadata or maybe an additional .xml
or .config
file which will only be used by the Event System of SDL Tridion.
You may want to follow the process below for sending email on an activity finish:
Create an Event System for Workflow
public class WorkflowEvent: TcmExtension
{
}
In the constructor, Subscribe the Finish Activity event as shown below:
EventSystem.Subscribe< ActivityInstance, FinishActivityEventArgs> (WorkFlowSendEmail, EventPhases.Initiated);
Write the code in the callback function - WorkFlowSendEmail something as below:
private static void WorkFlowSendEmail ( ActivityInstance subject, FinishActivityEventArgs args, EventPhases phase)
{
// Your Code to send email
}