This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.

Issue

The Workflow cannot be deployed due to a missing reference:

Missing reference at EmailConfiguration in Event 'Send Email' in Activity 'Send Email'. 
Error: The environment field SMTPField does not exist or might have been deleted.

Symptoms

The Mail Server environment field may either be:

  • Empty
  • Not set to default 

Troubleshooting Steps

  1. Ensure that a valid value is assigned to the Mail Server.

    If you are unable to supply a value due to this error: The connection string is invalid: [Mail Server value], please check the points below:


    a.  Run the query below to return the TypeId of the Mail Server field:

    SELECT TypeId FROM [Environment].[Field] WHERE FieldName='Mail Server'

    b.  Compare the value taken from the previous step to the one returned by the query below:

    SELECT TypeId FROM [Environment].[FieldType] WHERE FriendlyName='Mail Server'

    c.  If the values are different, update the TypeId in the [Environment].[Field] table to the correct one:

    UPDATE [Environment].[Field]
    SET TypeId = [TypeId from (b)]
    WHERE FriendlyName='Mail Server'

    d.  Restart the K2 service to reflect the change.

  2. If you have set a value to the Mail Server field, mark it as Is Default.

Incorrectly editing the K2 database can result in system instability or failure. Before making any database changes, it is strongly recommended to make a backup of your database. Database changes should only be performed by database administrators or users with sufficient knowledge and experience with SQL server to apply these changes correctly. If you need assistance with implementing these changes, please log a Support Ticket with K2 Product Support.