Open MarGraz opened 1 week ago
This could be a useful feature for email in general, do you want to send a PR for it? The template could be customizable: Liquid, Text .. etc
@hishamco I can implement the SendGrid one, adding a method in the SendGridService.cs class. But I need a new interface to use in DI, because ISmtpService
doesn't provide any method to be used with the SendGrid template 🤔
Of course, in this case, the template is provided by SendGrid. But yes, I agree, having the possibility to create a template and manage a list of them could be a nice feature for the Email module in general.
Thank you
Let's start on https://github.com/OrchardCoreContrib/OrchardCoreContrib repo and add templating infrastructure to the OCC.Email
Hi,
I think it would be great if the OrchardCoreContrib.Email.SendGrid module could implement the SendGrid client library to send emails using pre-created
Dynamic Templates
.SendGrid allows you to create email templates with placeholders in their backoffice, using a WYSIWYG editor (official guide here). You can then use the client library to select the template and pass dynamic text to the APIs. Here is an example of using Dynamic Templates.
Below is the code snippet from this example:
I think that should be sufficient to add another method in the SendGridService.cs class, that allows the use of a
Dynamic Template
.What do you think about it? 😊
Thank you