Skip to content

Instantly share code, notes, and snippets.

@chibenwa
Created July 2, 2019 04:27
Show Gist options
  • Save chibenwa/3301265734e14d4440b0c687e4082c51 to your computer and use it in GitHub Desktop.
Save chibenwa/3301265734e14d4440b0c687e4082c51 to your computer and use it in GitHub Desktop.
new jmap.Client(new jmap.RequestTransport())
.withAPIUrl('http://192.168.1.23:44333/jmap')
.withAuthenticationToken('d13f3593-3c43-4540-9f83-46342b626696')
.listThenGetMessages()
.then((response) => {
var messages = response[1][1].list;
messages.forEach(element => {
console.log('email has subject ' + element.subject)
});
},
(err) => {console.log(2222, err);});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment