Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thank you Silly! I'll check via Adobe Bridge ![]()
Thank you.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
You can reference below...
Extend_Script_experimentals/bridgeMailer.jsx at master · ten-A/Extend_Script_experimentals · GitHub
Copy link to clipboard
Copied
Thank you a lot CarlosCanto and Ten A ![]()
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more