Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Send e-mail via JavaScript?

Advocate ,
Jan 03, 2019 Jan 03, 2019

Hi all

I've written a script that processes an Illustrator file, then, as a final result, exports PDFs to a specific folder. Everything looking fine up to here. My code created almost 500 PDFs correctly.

The question is the following:

For each loop inside my script, I have a variable (called "myFile"), especifically a File object, that is exactelly my outputted PDF file.

I also have a variable (called "mail") especifically a string, that has stored an e-mail adress (this adress changes for each PDF).

I'd like, If possible, to send "myFile" to the e-mail stored in the "mail" variable.

I looked at Illustrator JavaScript reference and also to the JavaScript Tools Guide, but did not find any object or any way to do that.

Is there any way to send files, this case PDFs, created via Illustrator scripting, by e-mail???

P.s.: I also thought perhaps I could use BridgeTalk object to send the message/task to other Adobe Application to send this e-mail, but I really do not know If there's any Adobe Application that has an object or method to send e-mail via JavaScript (at least Photoshop and InDesign could not do that, If I remember well, and I did not find any way to target Acrobat in order to try this).

Any suggestion?

Thank you very much

TOPICS
Scripting
1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Valorous Hero ,
Jan 04, 2019 Jan 04, 2019

Using javascript, maybe it's possible via Bridge - but I'm not sure. However, using Applescript or VBS, you can grab a hold of your email client and make it send an email.

I've done this before in VBS, and it was a quick creation of mine that relied on time-outs to ensure the files were first written and attached before sending. Sometimes the files would be too big and I had to extend my timeout.. it helped reduce my clicks at the job though so it was beneficial. It had room for improvement.

If I had to do so with AppleScript then I'd have to make a .app and write down my arguments in a text file or something, so the .app can read them and then do the mail task.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 06, 2019 Jan 06, 2019

Thank you Silly! I'll check via Adobe Bridge

Thank you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 06, 2019 Jan 06, 2019

I send Outlook emails with attachments from Excel using VBA. I don't involve illustrator in my workflow but it could easily be integrated.

I'm on Windows

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 06, 2019 Jan 06, 2019
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 09, 2019 Jan 09, 2019
LATEST

Thank you a lot CarlosCanto​ and Ten A

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines