pentaho/pentaho-kettle · error · KettleException
Mail.Exception.CouldnotFindReplyNameField
Error message
Mail.Exception.CouldnotFindReplyNameField
What it means
Thrown by cacheFieldsPosition when the reply/sender NAME field configured in Mail meta is not found among incoming row fields. Only evaluated when a reply-name field is configured; indexOfValue returning -1 aborts the step.
Solutions
- Correct the 'Reply Name (from field)' setting to match an existing column
- Use the static sender-name option instead of the field-based one if the name is constant
- Ensure upstream emits the column for all rows
Example fix
// before
meta.setReplyName("sender_nm");
// after
meta.setReplyName("sender_name"); Defensive patterns
Strategy: validation
Validate before calling
// ensure the reply-name field exists when configured
if (!isEmpty(meta.getReplyName()) && rowMeta.indexOfValue(meta.getReplyName()) < 0) {
logError("Reply name field not in stream: " + meta.getReplyName());
} Try / catch
try {
step.processRow();
} catch (KettleException e) {
if (e.getMessage().contains("CouldnotFindReplyNameField")) {
logError("Reply name field missing: " + e.getMessage());
}
} Prevention
- Use the static sender-name option when the name does not vary per row
- Select fields from the dropdown instead of typing
- Confirm the stream layout after any upstream change
When it happens
Trigger: meta.getReplyName() is non-empty (field-based sender name) and data.indexOfSenderName == -1 after indexOfValue on previousRowMeta.
Common situations: Sender-name column renamed upstream; configured a literal name in the wrong (field-based) setting; input layout changed after configuration.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Mail.Exception.CouldnotFindContactPersonField
- Mail.Exception.CouldnotFindContactPhoneField
- Mail.Exception.CouldnotFindDestinationBCcField
- Mail.Exception.CouldnotFindDestinationCcField
- Mail.Exception.CouldnotFindDestinationField
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/f8a1cccc858d09c5.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/mail/impl/src/main/java/org/pentaho/di/trans/steps/mail/Mail.java:286
if ( !Utils.isEmpty( meta.getDestinationBCc() ) ) {
// cache the position of the BCc field
if ( data.indexOfDestinationBCc < 0 ) {
String realDestinationBCcFieldname = meta.getDestinationBCc();
data.indexOfDestinationBCc = data.previousRowMeta.indexOfValue( realDestinationBCcFieldname );
if ( data.indexOfDestinationBCc < 0 ) {
throw new KettleException( BaseMessages.getString(
PKG, "Mail.Exception.CouldnotFindDestinationBCcField", realDestinationBCcFieldname ) );
}
}
}
// Sender Name
if ( !Utils.isEmpty( meta.getReplyName() ) ) {
// cache the position of the sender field
if ( data.indexOfSenderName < 0 ) {
String realSenderName = meta.getReplyName();
data.indexOfSenderName = data.previousRowMeta.indexOfValue( realSenderName );
if ( data.indexOfSenderName < 0 ) {
throw new KettleException( BaseMessages.getString(
PKG, "Mail.Exception.CouldnotFindReplyNameField", realSenderName ) );
}
}
}
// Sender address
// cache the position of the sender field
if ( data.indexOfSenderAddress < 0 ) {
String realSenderAddress = meta.getReplyAddress();
data.indexOfSenderAddress = data.previousRowMeta.indexOfValue( realSenderAddress );
if ( data.indexOfSenderAddress < 0 ) {
throw new KettleException( BaseMessages.getString(
PKG, "Mail.Exception.CouldnotFindReplyAddressField", realSenderAddress ) );
}
}
// Reply to
if ( !Utils.isEmpty( meta.getReplyToAddresses() ) ) {
// cache the position of the reply to fieldView on GitHub (pinned to f3058517a1)