Try our conversational search powered by Generative AI!

Dac Thach Nguyen
Jul 31, 2018
  2907
(5 votes)

Language Manager: Receive email notification when import translation package success

When import a translation package using Language add-on, the project owner will be notified after the package is proccessed. The notification will be display on the bell which is on top of edit view. That required you to login into the system to know. The add-on allowed you to write your own notification provider which send notification in other channels.

In order to write custom provider you need to implement INotificationProvider which has method and property as below:

DisplayName: Name of the provider, example "Email Notification"
SetNotification: Method will be called after the import proccess has been finished.

After implement that interface, your notification provider will be display in config page of the add-on. See the image:Image language.png

Here is simple on I have implement, after config it in the admin page. You should receive email whenever a translation project imported.

public class EmailNotification : INotificationProvider
{
    public string DisplayName => "Email Notification";

    public void SetNotification(string userName, string message)
    {

        var mail = new MailMessage();
        mail.Subject = "Project has been translated successfully";
        mail.Body = message;

        mail.From = new MailAddress("<your email>@gmail.com");
        mail.To.Add(new MailAddress("<your email>@gmail.com"));

        var smtpClient = new SmtpClient();
        smtpClient.Send(mail);
    }
}
Jul 31, 2018

Comments

Please login to comment.
Latest blogs
A day in the life of an Optimizely Developer - Enabling Opti ID within your application

Hello and welcome to another instalment of A Day In The Life Of An Optimizely developer, in this blog post I will provide details on Optimizely's...

Graham Carr | May 9, 2024

How to add a custom property in Optimizely Graph

In the Optimizely CMS content can be synchronized to the Optimizely Graph service for it then to be exposed by the GraphQL API. In some cases, you...

Ynze | May 9, 2024 | Syndicated blog

New Security Improvement released for Optimizely CMS 11

A new security improvement has been released for Optimizely CMS 11. You should update now!

Tomas Hensrud Gulla | May 7, 2024 | Syndicated blog

Azure AI Language – Key Phrase Extraction in Optimizely CMS

In this article, I demonstrate how the key phrase extraction feature, offered by the Azure AI Language service, can be used to generate a list of k...

Anil Patel | May 7, 2024 | Syndicated blog

Webinar: Get Started with AI within Optimizely CMS

Join us for the webinar "Get Started with AI in Optimizely CMS" on Wednesday, May 8th. Don't forget to register!

Luc Gosso (MVP) | May 7, 2024 | Syndicated blog

Search & Navigation: Indexing job new features

From Episerver.Find version 16.1.0, we introduced some new features that make the indexing job in CMS more flexible and efficient: Support continuo...

Vinh Cao | May 7, 2024