8 Replies Latest reply on Oct 25, 2017 10:15 AM by dsawyer RSS
    dsawyer Explorer

    Get properties dynamically within email body

    Hi All

     

    I am trying to send an email (which all works fine) with some basic HTML, but need to call various Thing Properties, how do I go about this:

     

    var myHTML = "<html><head></head><body>\
    <h1>Title</h1>\
    Content bla bla bla <i>italic</i>\
    </body></html>";
    
    
    var params = {
    cc: undefined /* STRING */,
    bcc: undefined /* STRING */,
    subject: "High Usage Warning" /* STRING */,
    from: "87@Litres" /* STRING */,
    to: "ssssss@ssss.com/* STRING */,
    body: myHTML
    }
    
    
    // no return
    Things["EmailServer"].SendMessage(params);