Elsa workflow designer send mail option not available?

331 Views Asked by At

I am trying to follow this example

https://elsa-workflows.github.io/elsa-core/docs/next/guides/guides-document-approval#create-workflow.

In the ELSA Workflow designer, Send Email activity not available in the activities popup window. I need help to find Send Email activity.

1

There are 1 best solutions below

0
On

Email Activity is in another Nuget package. You first need to add the related package to your project:

dotnet add package Elsa.Activities.Email

Then, you need to add AddEmailActivities(...) in your main program:

var elsaSection = builder.Configuration.GetSection("Elsa");
builder.Services
   .AddElsa(elsa => elsa
      ...
      .AddEmailActivities(elsaSection.GetSection("Smtp").Bind)        
      ...
   )
   .AddAuthorization();

The Smtp config. need smtp host, port and default sender defined:

"Smtp": {
     "Host": "xxx.xxx.xxx",
     "Port": "443",
     "DefaultSender": "[email protected]"
}