0

Want to draft mail automatically where html body will be visible in email client. How to do it using nwjs desktop app? Major problem is showing html data in mail body.

1 Answers1

0

Your question is very vague.

How are you communicating with the "email client"? I assume you are passing it a string of text at some point. So you can pass it <strong>text</strong> instead of text. If it can handle that, then NW.js can do it. This isn't so much an issue with NW.js so much as sending data from one app to another, and you aren't supplying information to assist in that.

Jaredcheeda
  • 1,657
  • 17
  • 15
  • var gui = require('nw.gui'); gui.Shell.openExternal('mailto:test@example.com?subject=test&body=

    hello

    '); i am using this code to open email client with draft but in body

    hello

    text is showing. system is taking whole html tags as strings. Not sure whether it is a correct way of communicating with email client.
    – Satyajit Mishra May 11 '21 at 15:33
  • `var gui = require'nw.gui');` is only required if you are using the extremely old 0.12.3 or below of NW.js. Otherwise `nw.Shell.openExternal` is already globally available. Your code is just asking the OS to pass along 3 pieces of information to whatever the user's default email client is. See: https://stackoverflow.com/questions/5620324/mailto-link-with-html-body – Jaredcheeda May 24 '21 at 18:21