This article will guide you through the process of configuring a profile that searches for an email address in a document, places the email address in the To:
-field (CC: and BCC: are also possible) and sends the document to the email address as attachment.
Prerequisites
- Make sure email settings are configured so that you are able to email.
Go toManage > System Setup > System Settings > General email settings
- Understand how document previews work and how to enable preview mode. This comes in handy when configuring recognitions.
Print&Share CQ configuration
- To make the configuration of the recognition easier, get the document that you want to print (and email) and print it with preview mode to Print&Share CQ.
- First log in to the admin panel using a web browser.
- Navigate to
Manage > Workflow > Profiles
- Create a profile by clicking Create new and give the profile a name.
- Scroll down to the Channels-section, select the Email-option and click the Add Channel button. This will add a channel with email functionality to the profile.
- Click the pencil-icon to edit the newly added channel. This will allow you to configure the channel.
- We want to recognize an email from the document and put it in the
To:
field. To do this, scroll down to the Email message-section and click on theTo:
label. - Enable email recognition, and click Add rule to add a new recognition rule.
- For the Email recognition click the
...
-button to edit the recognition. - Now select
Recognition type:
Value
and forRegex type:
Email
.
This will use a basic regular expression for extracting an email. If you printed a job using preview mode you should be able to see the preview and the email highlighted.
- Click OK to save and close the dialogs.
- In the Email message-section, fill in a corresponding email next to the
From:
label. - At the channel configuration scroll to the top and click Save to save the configuration.
Now every job that you send will extract the email and send an email to that email address with the printed document as an attachment.
?
My email is not recognized. Why?
Currently the recognition relies on OCR. In some cases if for example the font is too small, a certain font family is used, the OCR might not return correct results. An option might be changing to another OCR reader. This can be done at:
Manage > System Setup > System settings > OCR Settings:
.
Even better might be not be dependent on OCR and for example use a barcode like Data Matrix
. This could only work if you are able to design or adjust your reports or documents so that it contains a barcode. When printing you can adjust the email recognition.
Instead of using Recognition type:
Value
and for Regex type:
Email
for the email recognition, you could use the option: Recognition type:
Barcode
and then select the specific barcode(s), e.g. Data Matrix
.
In case your barcode contains multiple email addresses, you could modify the found result:
- in the recognition click the Extra Options tab.
- Select
Regex
and click Add result adjuster to add the adjuster. - Specify a regular expression for emails containing a group. For example:
\s*(([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+))\s*
- Change the option of
Regex group:
toGroup 1
or the group that contains your regex. - This will give back all email addresses from the line that you had.
For example:
Barcode data contains: info@winking.be support@winking.be +3251232480
Barcode recognition extracted the result: info@winking.be support@winking.be +3251232480
The result adjuster applies a regular expression to that result, you select the results of a specific regex group and finally this will result in two emails as a regular expression match.
These two emails will then be used for the To:
field.