Report Email Sending Settings

If the Docentric Email print destination is selected when printing a report, that report will be emailed. Docentric brings several improvements to the emailing process. Some of these improvements require a dedicated per-report setup, Email sending settings, which can be found and configured in Docentric report setup.

This tutorial explains Email sending settings per report, which are used in the emailing process when the Docentric Email is selected as the target print destination.

In Docentric report setup select the report for which you want to specify the additional parameters related to the emailing process. Click the Settings > Email sending settings button, which opens the Email sending settings form for the selected report.

Email processing, Sender display name, Reply-to, Bounce-to settings

In the Email processing, Sender display name, Reply-to, Bounce-to tab you can configure per-report and per-company settings of Email fields and parameters that are not available on the Print destination settings form.

The following settings are available:

  • Email sending mode – this setting specifies what happens after the report document has been generated. Two options are available:
    • Synchronous: email will be sent as soon as the report document has been generated.
    • Email processing: email will not be sent, but it will be stored in the Email sending status table. Email will wait in a queue in order to be processed by Email distributor batch. This option is better for error handling purposes and from the performance point of view. Learn more >>
  • Email sender display name - the value specified here will appear as the From field on the recipient side:


    If left empty, Email sender display name which is configured in Docentric AX parameters > Emailing page will be used:

  • Reply-To address: Email address, which will be used on the recipient side for replying to the message. If recipient hits Reply in his email client, the email message To field will be populated with this value. If left empty, the sender email address will be used.
  • Bounce-To address: if set, this value will be used as so-called message Return-Path, which indicates where non-delivery receipts (or: bounced messages) are to be sent. If left empty, the sender email address will be used. Below is example of configured Bounce-To address and the email delivery error report:

     

Read and Delivery receipts, Message Priority

In the Read and Delivery receipts, Message priority tab you can configure few more per-report and per-company settings of email fields and parameters that are not available on the Print destination settings form.

  • Read receipt address: if you want to get a read receipt when emailing the report, specify the email address where you want to get the receipts. If you leave this empty then no receipts will be sent. You can enter a valid email address or the @FROM_ADDRESS@ placeholder, in which case the read receipt will be sent to the sender of the email.
  • Send delivery receipt: select the condition for sending the delivery receipt (Never, Always, On failure, etc.). The address to which it will be sent depends on the email sender account settings.
  • Email message priority: email message priority (Normal, High, Low). Below is an example of configured message priority and the mail on the recipient side:

     

Per-company setup

For each of the above described email fields and parameters you can specify different settings per legal entity. For example, if your company is multi-legal entity company, it would make sense to specify different Email sender display name or Reply-to address for each legal entity. In order to do this, you simply click the pencil icon next to the Per-Company specified field under the corresponding setting.

Learn more about Read and Delivery receipts >>

Example: Reply-to address, default and per-company setting

Let’s say that we want specific settings for some legal entities and a general setting to be used for all other legal entities. Then we might come up with a configuration like this:

When email recipient replies to our email, the To field in the reply email will be populated depending on the user’s legal entity as follows:

  • If report was sent by a user from the USMF company, the Reply-to address will be info@usmf.com.
  • If sent from the USSI company, the Reply-to address will be info@ussi.comm.
  • If sent from any other legal entity, the Reply-to address will be info@contoso.com.

Example: Sender display name setting

In this scenario, Sender display name for a received email will be populated as follows:

  • If a report was sent from the GBSI company, Sender display name would be 'Contoso GB Consulting'.
  • If sent from the USSI company, Sender display name would be as defined in the User options > Account page of the user who sent this document from D365FO via email.
  • If sent from any other legal entity, Sender display name would be the globally set value in Docentric AX parameters (due to the @GLOBAL_PARAMETER_VALUE@ token). You can quickly access the global parameter via the button Global email sending settings:

Email tokens

The settings in the Email tokens tab offer the possibility to specify how to deal with unresolved email tokens in email To, Cc and Bcc fields if the Docentric Email print destination is used for printing a report.

Email tokens introduction: what are they and why would you care?

To understand what email tokens are and how they are used in the report print destinations please read the introductory chapter of our manual on Using Email tokens with Email print destinations.

When we talk about resolving the email tokens, we mean the process of finding the actual email address which corresponds to a given email token and replacing the email token with the email address found. If the email address isn’t found, we say that the email token is unresolved. For example, in D365FO the Email token @@ stands for the party primary contact, in other words the party email address type of Contact information which is marked as Primary:

In the example above, @@ token for the Customer US-001 would be resolved as Contoso.Retail.San.Diego@customer60.consolidatedmessenger.com. If such record wouldn’t exist, the email token would be unresolved.

If you use the email tokens in the email To field, it is a good idea to know if some of them are not resolved. Consider the following examples:

  • In the worst-case scenario, if the email To field contains only email tokens and none of them was resolved, the email To field will be empty and such report will not be emailed. Let’s say that you are printing hundreds of Invoices to the email print destination, you would only get the message "Error while executing report", without any other information about the Invoice document being printed or the Customer missing the contact information. You will have a really hard time identifying the unsent invoices!
  • Even if the email To field isn’t empty and the report is emailed, but some of the tokens were unresolved, you would want to be able to identify such parties missing the necessary contact information, so that you can improve your data quality and to know that the email didn’t reach some important destination.

How can you handle the described scenarios? You simply configure the alternative print destination to be used for redirecting your reports, or at least enable the better error messages. For example:

  • You can send such report via email to a fixed email address in your company, for example to your administrator or some other employee responsible for the data quality. Or the report can be sent to the @USEREMAIL@ email address, this placeholder will be resolved as email address of the user who initated the report printing. In other words, you have configured the redirection to the Email print destination.
  • Or you could get such reports printed on your default printer, by setting the redirection print destination to be the Docentric Printer print destination with the @DEFAULT_PRINTER@ printer name selected.
  • You don’t need to configure the redirection print destination, so mail will not be sent, but you enable the new, informative error messages that will let you know exactly which kind of tokens were unresolved, for which party and on which document.

Email tokens setup

The Email tokens fast tab contains a grid where you can specify per-company the following:

  • What should happen if tokens in email To field were not resolved (yellow fields in the image below)? You can specify various options for redirecting such report to some other print destination.
  • Should the warning messages be displayed (green field below) if email tokens in email To, Cc and Bcc fields were not resolved?

The following settings are available:

  • Company ID: if a record for the current legal entity or for DAT company exists, its setting will be used in the process of resolving the email tokens. Current legal entity setting has priority over the DAT setting. If no record for the current legal entity or DAT company exists, you will get the standard D365FO behaviour.
  • Redirect to: if the condition specified in the Redirect if field is met, redirect the report to this print destination. You modify this value by clicking the Change Redirect To button, which opens the Print destination settings form.
  • Redirect if: specifies the condition under which the print destination redirection should happen. You have the following possibilities:
    • Never: no redirection happens. You would use this setting if you don’t want to redirect your report to some other print destination, but you still want to be informed about the unresolved tokens by configuring the Show warning message field.
    • To field is empty due to unresolved tokens: this is the most important option which prevents the situation where the report is not sent, and you even don’t know about it!
    • Primary contact token is unresolved: useful setting for companies which rely on the primary contact information. This condition is checked if the primary contact token (@@) is used in the email To field and is not resolved.
    • No Purpose token is resolved: some companies rely mainly on party purpose contact information (for example: Business purpose, Invoice purpose etc.) and might find this setting useful. This condition is checked if at least one of the Purpose tokens (such as: @Invoice@, @Business@ or similar) is used in the email To field.
    • No token is resolved: this option is useful if you want to have a control of your data quality. You might configure the email To field as a combination of email tokens and some fixed email address. As a result, email To field will not be empty and the mail will be sent, but it will probably not reach some important recipient.
    • At least one token is unresolved: similar as above, your email might be sent but miss an important recipient, so this option helps improve your data quality.
  • Show redirection message: if checked, the information about the redirection will be displayed. If you are usually printing many documents at once, then getting many redirection messages might be overwhelming for the users, but it might be useful in some other situations, so you have the possibility to decide what works best for your situation. This is an example of the redirection message.

  • Show warning message: if option other than "Never" is used, you will get the detailed information about the unresolved tokens, the party type and account number where the contact information is missing, as well as the identification of the document where the tokens were unresolved. You can select for which fields to analyse the tokens: never, for all email fields (To, Cc, Bcc) or only for email To field. Below is an example of the warning message:

  • Change redirect to button: opens the Print destination setting form for the selected record, where you can modify the Redirect to print destination.



    You can select any Docentric print destination, even the Docentric Email print destination as the Redirect to print destination. If you specify the Docentric Email print destination with email tokens in the email To field, and some or all of the Email tokens are not resolved, there will be no new redirection. Processing of the Redirect to print destination will be the same as if there was no redirection configured.
Be careful when using email tokens in the Redirect to print destination, because redirection happens only once. If there are again unresolved email tokens in the Redirect to print destination, report execution is continued as if there was no redirection configured in the first place, so it might happen (due to unresolved tokens) that your report will not be printed at all!

See the example: Email or print an invoice depending on the customer’s email address availability >>

See also

Report Emailing Capabilities >>
Report Email Templates >>
Email Reports From Multiple Sender Addresses >>
Set Up Read and Delivery Receipts >>
Email Token Redirection Example >>
Email Reports With Additional Attachments >>
Email Reports Using Email Distributor Batch >>
Troubleshooting Techniques for Solving Emailing Issues >>

IN THIS ARTICLE