Skip to main content
15-Moonstone
Jul 4, 2018 9:49 AM UTC
Question

need to send grid data from mashup into the e-mail

I have one requirement, I want to send the grid data to the user through e-mail. what is the feasible solution. 

    13 replies

    1-Visitor
    Jul 4, 2018 10:59 AM UTC

    Just build and email with HTML Content and send it with the MailExtension

    Translate
    KSM15-MoonstoneAuthor
    15-Moonstone
    Jul 4, 2018 11:28 AM UTC

    Thanks,

    could you please elaborate little bit and if any sample code you have .

    Translate
    1-Visitor
    Jul 4, 2018 1:41 PM UTC

    You just need to fill a String with the desired html format and send it with a Thing which derived MailServer ThingTemplate (that you will find on Marketplace Extension: https://marketplace.ptc.com/apps/193028/mail-extension )

     

    var emailContent = "<html><body>\
     <table>\
     <tr><td>Column1</td><td>Column2</td></tr>\
     <tr><td>RowValue1</td><td>RowValue2</td></tr>\
    </table></body></html>"
    
    Things["YourMailServerThing"].SendMessage({
     from: "youremail@yourmailserver",
     to: "email_destination@anothermailserver",
     subject: "Awesome email, with a table :P",
     content: emailContent
    });
    Translate