030-010 MetaServer Export – Export to Email
Some example use-cases:
– Email the processed documents to trigger a business process.
– Email documents to a predefined email address to save it in a document management system.
– Automatically send the processed documents as PDF attachments to specified recipients.
– Email documents with missing information, for example, a missing signature, to a pre-defined email address for exception processing.
In our example, we will make use of the “CB – INVOICES US” workflow. This workflow is automatically installed with CaptureBites MetaServer.
We want to make it possible to mark invoices during validation for being emailed to management. For example, if an invoice is higher than $20,000, we want to email it to management:
The email will have a dynamic body text where the document’s extracted fields are filled out. The recipient’s address is specified in a field.
01 Export to Email – Adding the Action
To add an Export to Email action, select the action after which you want to insert the Export to Email action and press Add -> Export -> to Email. The Setup window will automatically open.
You can also open an existing Export to Email action by double-clicking the action or by pressing the setup button on the right side of the action or in the ribbon, as shown below.
02 Export to Email – Setup – Send information
When opening the Export to Email setup window, the Send Information tab is opened by default. Here, you specify your SMTP server and Email header settings.
TIP: The thumbnail on the right will follow you, so you can easily refer to the Setup window. Click on the thumbnail to make the image larger.
Don’t forget to add a description to your action.
01 – SMTP Server: replace the placeholder CaptureBites SMTP Server settings with your own SMTP Server details. The CaptureBites SMTP server is only meant for demo and test purposes, please use your own server settings when the workflow is used in production.
Your SMTP Server settings can be found by contacting your IT department or through your e-mail provider. SMTP settings for Gmail can be found as step 2 here. For Office 365, you can find the SMTP settings here.
1) Address: enter your email provider’s SMTP server address.
2) User name: the user name is typically your email address. When in doubt, contact your IT department.
3) Password: enter your SMTP server password. This is often the password you use to log into your email system. When in doubt, contact your IT department.
4) Timeout: if you have a slow or erratic internet connection, consider increasing the Timeout setting.
5) Check internet connection: if you only send internal email, which doesn’t require an internet connection, you can disable this option.
6) SSL: SSL (secure socket layer) is a way of encrypting your email data as it travels across the internet. Check with your email provider if they require SSL and enable this option if they do. Gmail, for example, requires SSL.
7) Port: the SMTP Port is often 25 or 587 if you don’t use SSL. Port 465 is typically used in combination with implicit SSL.
TIP: If you want to use Gmail as your SMTP server, first login to Gmail on the station running MetaServer via a browser. In that way, the IP address of that station becomes white listed on the Google SMTP servers and you can send e-mails from MetaServer. Gmail’s security strategy changes frequently and Gmail also sets limits to the number of emails you can send through smtp.gmail.com. So, we advise to only use smtp.gmail.com for tests or if the number of emails sent by MetaServer is limited.
02 – Email header: here, you enter the email header information.
1) From: enter the sender’s email address.
2) Display name: this is the sender’s “friendly” name. For example, you could send emails as email@example.com and use “Please do not reply” as the friendly name. The email address will then be converted into the “friendly” display name at the receiver’s end.
3) To: you can enter the recipient’s email address manually or select a field holding it. You can enter multiple email addresses, or the selected field can hold multiple email addresses.
You can optionally specify the display name by separating it with a comma “,”.
For example: firstname.lastname@example.org, James P. Sullivan.
You can also specify multiple recipients by separating them with semi-colons “;” or colons “:”. For example: email@example.com,John Doe;firstname.lastname@example.org,Jane Doe.
Some more examples of valid email addresses:
– email@example.com:firstname.lastname@example.org,Mike Wazowksi;email@example.com,James P. Sullivan
4) Cc: with cc recipients you can, for example, import incoming orders and email them to your customers as a confirmation. You can also cc a person in sales administration to fulfill the order. Another example is an “Archive” email address, to archive all outgoing email for later reference.
Press the Edit button next to the Cc box to open its setup window and specify one or more cc email addresses.
5) Subject: you can compose your email subject by combining fixed values, fields and metadata. Click on the drop-down arrow to pick from a list of possible values. You can see an example of your Subject line below the input field.
03 – Test: enter your email address in the “To” input field as the recipient and press the “Test” button to check your connection. You will receive an email confirming that the connection is successful. Don’t forget to change it back to the correct recipient after testing.
03 Export to Email – Setup – Attachments
Use the attachments tab to specify your email’s attachments’ settings.
Don't forget to add a description to your action.
01 - File Source: press the dropdown button to specify the source of your files.
By default, Processed PDF is selected. This means that the output will be a PDF, no matter what the original imported file type was.
- PDF/TIF/JPG/PNG attachment: refers to PDF, TIF, JPG or PNG files that were imported by means of the Import Email action.
- Email PDF: refers to the email body converted to PDF format.
- Email EML: refers to the complete imported Email including all its attachments in EML format.
- Email MSG: refers to the complete imported Email including all its attachments in MSG format.
- Imported PDF/TIF/JPG/PNG: refers to the original PDF, TIF, JPG or PNG files that were imported by means of an Import from Folder action.
- Processed PDF: refers to the PDF or TIF after every prior action. For example, if you've applied a Scale Page(s) action before exporting to a folder, it will export the scaled PDF.
- Processed TIF: refers to the TIF version of an imported PDF or PDF attachment converted to TIF with a Convert to Multipage TIF action.
NOTE: if you want to separate an imported multipage TIF file and export the separated TIF files, you need to add a Convert to Multipage TIF action before exporting. In the export action, select "Processed TIF" as the File Source.
1) Labels: you can change the labels of each file source if you want to use them later as metadata values in your settings.
02 – Attach files: enable this option if you want to attach files to your email.
1) File name: compose your attachment file name by combining fixed values, fields and metadata. Click on the drop-down arrow to pick from a list of possible values. You can see an example of your file name below the input field.
03 – Attach index file: enable this option if you want to attach an index file to your email.
1) File name: compose your attachment index file name by combining fixed values, fields and metadata. Click on the drop-down arrow to pick from a list of possible values. You can see an example of your index file name below the input field.
01 Index file – Setup
To set up the format and content of your index file attachment, press the “…” button next to the File name’s input box.
The index file setup window opens. Below is an example of a CSV index file. In this case, it holds every extracted field value.
02 – Encoding: specify the required encoding method.
03 – Header, Content & Footer: you can freely define the header, body and footer of your index file by combining fixed words, fields and metadata.
In this example, we export a CSV index file. If we open it in a CSV Viewer, it looks like this:
04 – Preview: to see a preview of your index file, press the Preview button. The preview window opens and shows an example output of your index file. In the example below, you see the preview of our CSV file.
In this example, we export a CSV index file. If we open it in a CSV Viewer, it looks like this:
04 Export to Email – Setup – Text Message
The Text Message tab allows you to set up and format your email’s body text. This is all plain text, this is useful if your recipient’s e-mail application does not support HTML text.
05 Export to Email – Setup – HTML Message
The last tab opens the HTML Message Setup screen. You can define your message in HTML format here.
With HTML you can use various font styles and insert hyperlinks and images in your body text.
Typically, you create the HTML code with an HTML editor, like HTML-Online or offline tools like Brackets or KompoZer. These kinds of editors allow you to format the text with standard word processing tools. The tool will then generate the HTML code for you, which you can copy and paste into the Header, Content and / or Footer input boxes.
For example, using the HTML-Online tool:
Use the text editor on the left to set up your body. On the right, your HTML code will be generated on the fly.
Press the Preview button to see the result in a Preview window.
When you’re satisfied with the result, copy the HTML code…
…and paste it in the Content input box.
01 – Thumbnail: with this, you can adjust the size and appearance of the generated thumbnails for your attachments. Press the Thumbnail button to open the setup window.
1) Maximum size: here you can specify the maximum width and height of the attachment thumbnail.
2) Border: if you want a border around your thumbnails, you can specify the thickness and the color. If you don’t want a border, set the thickness to 0 pixels.
TIP: you can copy the current settings and paste them in another setup window of the same type. Do this by pressing the Settings button in the bottom left of the Setup window and by selecting Copy. Then open another setup window of the same type and select Paste.