Giter Site home page Giter Site logo

azure-communications-serivice-email-templates-spring-boot's Introduction

azure-communications-serivice-email-templates-spring-boot

Using email templates in azure communications service with spring boot

  • Configure Azure Communications Service connection-string into application.properties

The system expects templates to be on the resources folder.

Example request to invoke it (POST http://localhost:8080/email/send):

{
  "template": "template1.html",
  "to": "[email protected]",
  "subject": "test email",
  "sender": "[email protected]",
  "templateData": {
    "headertext": "<p>This is marketing email header example</p>",
    "buttonlink": "http://portal.azure.com",
    "buttontext": "Azure Portal",
    "bodytext": "<p> Clicking the button you can get into Azure portal</p>"
  }
}

Templates

The system has 2 levels of template, a common wrapper and one that can be given as input. In the example message, 'template1.html' is given as input and is inserted inside of main.html (the wrapper).

The system uses {{handlebars}} for replacement fields, but you can edit the replacement function to use something else.

Authentication

Connection string

Specify azure.communication.connection-string in application.properties.

Managed identity

Leave azure.communication.connection-string empty or remove it from application.properties. Add azure.communication.endpoint in application.properties.

azure-communications-serivice-email-templates-spring-boot's People

Contributors

piizei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.