{"record":{"id":"315f4268af94c829","repo":"pentaho/pentaho-kettle","slug":"mail-error-replyemailnotfilled","errorCode":null,"errorMessage":"Mail.Error.ReplyEmailNotFilled","messagePattern":"Mail\\.Error\\.ReplyEmailNotFilled","errorType":"exception","errorClass":"MessagingException","httpStatus":null,"severity":"error","filePath":"plugins/mail/impl/src/main/java/org/pentaho/di/trans/steps/mail/Mail.java","lineNumber":622,"sourceCode":"\n      msg.setHeader( \"X-Priority\", priorityAsInt ); // (String)int between 1= high and 3 = low.\n      msg.setHeader( \"Importance\", meta.getImportance() );\n      // seems to be needed for MS Outlook.\n      // where it returns a string of high /normal /low.\n      msg.setHeader( \"Sensitivity\", meta.getSensitivity() );\n      // Possible values are normal, personal, private, company-confidential\n    }\n\n    // set Email sender\n    String emailAddress = senderAddress;\n    if ( !Utils.isEmpty( emailAddress ) ) {\n      // get sender name\n      if ( !Utils.isEmpty( senderName ) ) {\n        emailAddress = senderName + '<' + emailAddress + '>';\n      }\n      msg.setFrom( new InternetAddress( emailAddress ) );\n    } else {\n      throw new MessagingException( BaseMessages.getString( PKG, \"Mail.Error.ReplyEmailNotFilled\" ) );\n    }\n\n    // Set reply to\n    if ( !Utils.isEmpty( replyToAddresses ) ) {\n      // get replay to\n      // Split the mail-address: space separated\n      String[] reply_Address_List = replyToAddresses.split( \" \" );\n      InternetAddress[] address = new InternetAddress[reply_Address_List.length];\n\n      for ( int i = 0; i < reply_Address_List.length; i++ ) {\n        address[i] = new InternetAddress( reply_Address_List[i] );\n      }\n\n      // To add the real reply-to\n      msg.setReplyTo( address );\n    }\n\n    // Split the mail-address: space separated","sourceCodeStart":604,"sourceCodeEnd":640,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/mail/impl/src/main/java/org/pentaho/di/trans/steps/mail/Mail.java#L604-L640","documentation":"Thrown in Mail.sendMail() when the reply-to/from email address variable is empty, so a valid InternetAddress cannot be constructed and msg.setFrom() would fail. The library requires a non-empty reply address before building the MIME message.","triggerScenarios":"sendMail() is called with replyAddress (destination/from field) null, empty, or containing only whitespace after environment variable substitution.","commonSituations":"Mail step configured without a destination address; a kettle environment variable (e.g. ${DEST_EMAIL}) is unset or empty at runtime; address only in a variable that was not defined in the transformation's parameter/environment settings.","solutions":["Open the Mail step dialog and set the Destination (or relevant address) field to a valid email address.","If the field references a variable like ${DEST_EMAIL}, define it in kettle.properties, run configuration parameters, or the transformation parameters with a non-empty value.","Add a validation/check step (or 'Check logic' in the step) before send to fail fast on empty addresses."],"exampleFix":"// before\nreplyAddress = \"${DEST_EMAIL}\"; // DEST_EMAIL unset at runtime\n// after\nreplyAddress = \"ops@example.com\"; // or ensure DEST_EMAIL is defined in kettle.properties","handlingStrategy":"validation","validationCode":"String addr = transMeta.environmentSubstitute(replyAddress);\nif (addr == null || addr.trim().isEmpty()) {\n  throw new KettleException(\"Mail step: reply/destination address is empty; set it or define the referenced variable.\");\n}","typeGuard":null,"tryCatchPattern":"try { sendMail(...); } catch (MessagingException e) { logError(\"Mail send failed: check address configuration: \" + e.getMessage(), e); }","preventionTips":["Never leave the destination/reply field blank in the Mail step dialog.","Prefer literal addresses over variables for fixed alerts; if using variables, define them in kettle.properties and document them.","Run the step's 'Check logic' before deploying transformations."],"tags":["email","smtp","configuration","empty-value"],"backgroundTag":"empty-required-field","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"}