Telligent 5.6

Telligent 5.6

This question has suggested answer(s)

How i can extend my Email template in Telligent 5.6.

Is there a ways like it is there in Telligent6.0 by IEmailTemplateExtension interface

All Replies
  • Hey there,

    It's pretty easy to add a extension for the 5.6 emails. You can make a class accessible to your email templates by adding a simple Telligent.MailGateway.Templating.Chalk attribute along with how you want to reference it.  Take the following code for example:

    [Telligent.MailGateway.Templating.Chalk("hi")]
    public class SayHi
    {
    	public string Speak()
    	{
    		return "Hello there!";
    	}
    }

    In this example we give the SayHi class the Chalk attribute and pass in "hi", which is how we will reference it in the email template.  You can then go to any email template and add

    $hi.Speak()

    and you will see "Hello there!" in the email.  You can of course create more complex methods with whatever parameters you'd like.  Just make sure you drop the DLL containing your code in both the job scheduler and in the web/bin folders so Mail Gateway will find it.  It will be loaded automatically :)