Creating email: subject and body

Is possible to create an extension that by selecting the URL or any text of the webpage text automatically generates an email (with your default email app) and adds the link or text selected to the body of the message and adds as subject of the email the title of the webpage? (e.g., if it is an article, to display the name of the article in the subject)

If there is alternatively a Chrome extension for this, feel free to recommend.

Thank you!

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

AWESOME!
THANKS a lot!

1 Like