{"record":{"id":"b8caa60256b66d61","repo":"pentaho/pentaho-kettle","slug":"mail-exception-couldnotfindreplyaddressfield","errorCode":null,"errorMessage":"Mail.Exception.CouldnotFindReplyAddressField","messagePattern":"Mail\\.Exception\\.CouldnotFindReplyAddressField","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/mail/impl/src/main/java/org/pentaho/di/trans/steps/mail/Mail.java","lineNumber":297,"sourceCode":"    // Sender Name\n    if ( !Utils.isEmpty( meta.getReplyName() ) ) {\n      // cache the position of the sender field\n      if ( data.indexOfSenderName < 0 ) {\n        String realSenderName = meta.getReplyName();\n        data.indexOfSenderName = data.previousRowMeta.indexOfValue( realSenderName );\n        if ( data.indexOfSenderName < 0 ) {\n          throw new KettleException( BaseMessages.getString(\n            PKG, \"Mail.Exception.CouldnotFindReplyNameField\", realSenderName ) );\n        }\n      }\n    }\n    // Sender address\n    // cache the position of the sender field\n    if ( data.indexOfSenderAddress < 0 ) {\n      String realSenderAddress = meta.getReplyAddress();\n      data.indexOfSenderAddress = data.previousRowMeta.indexOfValue( realSenderAddress );\n      if ( data.indexOfSenderAddress < 0 ) {\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"Mail.Exception.CouldnotFindReplyAddressField\", realSenderAddress ) );\n      }\n    }\n\n    // Reply to\n    if ( !Utils.isEmpty( meta.getReplyToAddresses() ) ) {\n      // cache the position of the reply to field\n      if ( data.indexOfReplyToAddresses < 0 ) {\n        String realReplyToAddresses = meta.getReplyToAddresses();\n        data.indexOfReplyToAddresses = data.previousRowMeta.indexOfValue( realReplyToAddresses );\n        if ( data.indexOfReplyToAddresses < 0 ) {\n          throw new KettleException( BaseMessages.getString(\n            PKG, \"Mail.Exception.CouldnotFindReplyToAddressesField\", realReplyToAddresses ) );\n        }\n      }\n    }\n\n    // Contact Person","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/mail/impl/src/main/java/org/pentaho/di/trans/steps/mail/Mail.java#L279-L315","documentation":"Thrown by cacheFieldsPosition when the sender (reply) ADDRESS field configured in Mail meta is absent from the incoming row. Unlike the other lookups this one is unconditional: the step always expects the sender-address field, so a missing column always aborts processing.","triggerScenarios":"cacheFieldsPosition runs and data.indexOfSenderAddress == -1 after indexOfValue(meta.getReplyAddress()) on previousRowMeta.","commonSituations":"From-address column dropped or renamed upstream; wrong field name entered in the Mail step; reusing the step metadata with a differently-shaped input stream.","solutions":["Fix the 'Sender Address fieldname' setting to an existing incoming column","Add the column upstream via Add constants if the address is fixed","Re-select the field in the Mail step dialog after upstream changes"],"exampleFix":"// before\nmeta.setReplyAddress(\"from_field\");\n// after\nmeta.setReplyAddress(\"from_address\");","handlingStrategy":"validation","validationCode":"// the sender-address lookup is unconditional: verify it always exists\nif (rowMeta.indexOfValue(meta.getReplyAddress()) < 0) {\n  logError(\"Sender address field not in stream: \" + meta.getReplyAddress());\n}","typeGuard":null,"tryCatchPattern":"try {\n  step.processRow();\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"CouldnotFindReplyAddressField\")) {\n    logError(\"Sender address field missing: \" + e.getMessage());\n  }\n}","preventionTips":["Always emit the sender-address column upstream (Add constants if fixed)","Check for typos between the dialog setting and the actual column name","Re-validate the step after changing the input source"],"tags":["kettle","mail","field-lookup","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}