Notification for receiving new emails.
import * as ds from "@devicescript/core"
const email = new ds.EmailClient()
Registers
openListen(body: string)
Open the new email listener.
import * as ds from "@devicescript/core"
const email = new ds.EmailClient()
const body = JSON.stringify({
email: '', // email address
password: '', // email password
})
await email.openListen(body)
closeListen()
Turn off the new email listener.
import * as ds from "@devicescript/core"
const email = new ds.EmailClient()
await email.closeListen()
Events
listen
When a new email is detected.
email.listen.subscribe(() => {
...
})