SaaS CMS has officially launched! Learn more now.

Dac Thach Nguyen
Jul 31, 2018
  2946
(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
Optimizely SaaS CMS Concepts and Terminologies

Whether you're a new user of Optimizely CMS or a veteran who have been through the evolution of it, the SaaS CMS is bringing some new concepts and...

Patrick Lam | Jul 15, 2024

How to have a link plugin with extra link id attribute in TinyMce

Introduce Optimizely CMS Editing is using TinyMce for editing rich-text content. We need to use this control a lot in CMS site for kind of WYSWYG...

Binh Nguyen Thi | Jul 13, 2024

Create your first demo site with Optimizely SaaS/Visual Builder

Hello everyone, We are very excited about the launch of our SaaS CMS and the new Visual Builder that comes with it. Since it is the first time you'...

Patrick Lam | Jul 11, 2024

Integrate a CMP workflow step with CMS

As you might know Optimizely has an integration where you can create and edit pages in the CMS directly from the CMP. One of the benefits of this i...

Marcus Hoffmann | Jul 10, 2024

GetNextSegment with empty Remaining causing fuzzes

Optimizely CMS offers you to create partial routers. This concept allows you display content differently depending on the routed content in the URL...

David Drouin-Prince | Jul 8, 2024 | Syndicated blog

Product Listing Page - using Graph

Optimizely Graph makes it possible to query your data in an advanced way, by using GraphQL. Querying data, using facets and search phrases, is very...

Jonas Bergqvist | Jul 5, 2024