Creating email: subject and body

Hiya – give thos one a try:

#popclip
name: Email Text
icon: symbol:mail
javascript: |
  let to = ''
  let subject = popclip.context.browserTitle.length > 0 ? popclip.context.browserTitle : 'Clipping'
  let body = popclip.input.text
  if (popclip.context.browserUrl.length > 0 ) {
     body += '\n' + popclip.context.browserUrl
  }
  popclip.openUrl(`mailto:${encodeURIComponent(to)}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`)

(The above block is an extension snippet - select it to install the extension with PopClip)

4 Likes