How to email a specific pdf file from file cabinet as attachment to a specific recipient?
I have over 100 PDF files saved in my file cabinet with a different name or email address. I want to automatically email those files as attachments to the recipients whose email id is mentioned as the name of the PDF files.
How can I do this in NetSuite? Kindly help me in this regard.
This depends on the setup of your filing cabinet.
You can have a Map/Reduce script that searches for all PDFs in the filing cabinet, but I imagine you would have other PDFs you didn’t want to send emails for.
So if all of the PDFs you would like to send are in one folder, you can use a Map/Reduce script with a file search to find all of the PDFs within a specific folder(s).
For each PDF you will need to use string manipulation to get the email ID, then send the email using the N/email module.
You are probably best moving the PDF to a separate folder within the Filing Cabinet once the email has been sent to avoid sending out the same email twice.
Again, much of what I mentioned above depends on how the Filing Cabinet is set up and the format of the PDF names.