Repeated errors in logs: Email must contain at least one valid email address in the To, CC or BCC address list

Version 1

    Details

    The error 'Email must contain at least one valid email address in the To, CC or BCC address list' appears in the Logs fairly constantly, but the emails appear to be sent correctly. However, upon closer examination, the emails are being sent to the person who submitted the record, instead of the analyst assigned. This includes escalation related notices and other messages meant for internal use only.


    Resolution

     

    This is a configuration issue, and is caused by a combination of  a notification that is genuinely missing a recipient address value (ToAddr filed), and an editing business rule on Journal.Email that updates the field. These business rules are not default behavior, but are commonly added to fill in the To: value on outgoing manually created email with data from the parent record. The error most commonly appears when the Response Threshold Breach quick action is triggered on an Incident by the escalation schedule. This notification tries to send to $(OwnerEmail) but the nature of the escalation is that an Owner has not been assigned, so there is no value to populate. This is what is causing the error in the Logs, due to the timing of the field update.  In the default configuration, this problem exists, but the email is simply not sent since the ToAddr field remains blank. However, if there is a business rule on Journal.Email that fires on update of ParentLink_RecID that updates the ToAddr field, then the field will be updated as well as the error being generated - if the field is empty, it is updated to the Customer's address from the Incident. This causes Incident Response breach notifications to go to the Customer of the Incident instead of the Owner, as well as generating the error.

    Here is an example of the business rule that updates the ToAddr field when it is empty:
    $(if nvl(ToAddrList,  "") == ""
      then if ParentLink_Category == "Incident"
           then [Incident#.]Email
           else [ServiceReq#.]Email
      else ToAddrList)

    I would advise adding a similar expression  to the ToAddr field in the Response Threshold Breach notification, as well as any other notifications that exhibit similar behavior, but replace the references to customer email with Owner Team Email or Team Manager Email, depending on which values are populated and appropriate.