Skip to main content
subieguy2
Inspiring
March 27, 2019
Question

Open a mailto?

  • March 27, 2019
  • 2 replies
  • 1623 views

I am giving the user the ability to type in a field. IF they enter something in the field I am needing feedback in order to make corrections. I am wanting the script to open an email with some details filled in already. Make it simple to give/get feedback. Is there a way within Javascript in Illustrator to do that?

This topic has been closed for replies.

2 replies

Brainiac
March 30, 2019

Found the EmailWithAttachment.jsx script on my disk under:

applications > Adobe ExtendScript Toolkit CC > SDK > Samples > javascript

Did not look thoroughly through it. Description at the top of the code:

Shows how to use the Socket object to send emails with attachments using ExtendScript.

Also this:

This sample sends a single email message at a time, and blocks the main thread until the message has been sent. You should select small files (under 100Kb) to send. For a non-blocking example, suitable for sending larger files, see BackgroundEmailer.jsx available in the Bridge SDK samples.

Regards,
Uwe

Silly-V
Brainiac
April 1, 2019

Please be aware that Illustrator has no Socket object, so any such magic would likely have to be sent over via BridgeTalk to an application which has Socket support - I'm not sure which ones don't have it besides Ai - most often I would use Bridge since it's free and everyone's likely to either have it installed or at least available.

Brainiac
April 1, 2019

Hi Silly-V ,

Socket is part of the Core JavaScript Classes that come along with ExtendScript.

Documented by Jongware e.g. here:

CS3 JS: Socket

Regards,

Uwe

Brainiac
March 27, 2019

Hi subieguy2 ,

what's the operating system?

What's the version of Illustrator?

Regards,
Uwe

Brainiac
March 27, 2019

When on OS X think of curl that could be executed with the command line by AppleScript.

curl - How To Use

curl - Known Bugs

( See section 3 Email protocols )

Also possible, not tested with a mail protocol, use PhotoShop's app.system() function to call curl on Mac OS X or perhaps a similar service on WIndows. Search the web for samples. FWIW: You could access PhotoShop via ExtendScript's BridgeTalk module.

Just to give you some ideas from the InDesign scripting side by Marc Autret what's possible with e.g. curl on Mac OS X, also something else for Windows: Re: [ANN] IdExtenso: InDesign JSX Framework

Regards,
Uwe