1
0
-1

In the TM Core API there is a method for sending templated email messages which include portal styling

Is there an equivalent method in the Fluent API? I know I can do this myself by finding the portal property and merging the Velocity template, but I'm looking for a short-cut.

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi Jye

      There is no exactly the same "one invocation" capability in Fluent API (so I would ask you to file a feature request for v5.1.0).

      But you can still implement that with Fluent API by merging template and then send email with the help of classes:
      import com.avoka.tm.util.VelTemplate
      import com.avoka.tm.svc.Emailer

      String emailMessage  = new VelTemplate()
            .setTemplate("emailTemplate")
            .addModelValue("user", user)
            .merge()

      new Emailer()
          .setToAddress("john@doe.com")
          .setTxnId(3L)
          .setSubject("Subject")
          .setMessage(emailMessage)
          .sendEmail()

       

      Regards
      Rado

        CommentAdd your comment...