{"record":{"id":"13560a0ee5b45376","repo":"pentaho/pentaho-kettle","slug":"jobmail-error-replyemailnotfilled","errorCode":null,"errorMessage":"JobMail.Error.ReplyEmailNotFilled","messagePattern":"JobMail\\.Error\\.ReplyEmailNotFilled","errorType":"exception","errorClass":"MessagingException","httpStatus":null,"severity":"error","filePath":"plugins/mail-job/impl/src/main/java/org/pentaho/di/job/entries/mail/JobEntryMail.java","lineNumber":1036,"sourceCode":"\n        msg.setHeader( \"X-Priority\", priorityAsInt ); // (String)int between 1= high and 3 = low.\n        msg.setHeader( \"Importance\", importance );\n        // seems to be needed for MS Outlook.\n        // where it returns a string of high /normal /low.\n        msg.setHeader( \"Sensitivity\", sensitivity );\n        // Possible values are normal, personal, private, company-confidential\n      }\n\n      // Set Mail sender (From)\n      String senderAddress = environmentSubstitute( replyAddress );\n      if ( !Utils.isEmpty( senderAddress ) ) {\n        String senderName = environmentSubstitute( replyName );\n        if ( !Utils.isEmpty( senderName ) ) {\n          senderAddress = senderName + '<' + senderAddress + '>';\n        }\n        msg.setFrom( new InternetAddress( senderAddress ) );\n      } else {\n        throw new MessagingException( BaseMessages.getString( PKG, \"JobMail.Error.ReplyEmailNotFilled\" ) );\n      }\n\n      // set Reply to addresses\n      String reply_to_address = environmentSubstitute( replyToAddresses );\n      if ( !Utils.isEmpty( reply_to_address ) ) {\n        // Split the mail-address: space separated\n        String[] reply_Address_List = environmentSubstitute( reply_to_address ).split( \" \" );\n        InternetAddress[] address = new InternetAddress[reply_Address_List.length];\n        for ( int i = 0; i < reply_Address_List.length; i++ ) {\n          address[i] = new InternetAddress( reply_Address_List[i] );\n        }\n        msg.setReplyTo( address );\n      }\n\n      // Split the mail-address: space separated\n      String[] destinations = environmentSubstitute( destination ).split( \" \" );\n      InternetAddress[] address = new InternetAddress[destinations.length];\n      for ( int i = 0; i < destinations.length; i++ ) {","sourceCodeStart":1018,"sourceCodeEnd":1054,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/mail-job/impl/src/main/java/org/pentaho/di/job/entries/mail/JobEntryMail.java#L1018-L1054","documentation":"Thrown in JobEntryMail's mail-sending routine when the reply/from address is empty, so msg.setFrom() cannot receive a valid InternetAddress. Mirrors the transformation Mail step error for the job entry.","triggerScenarios":"The job entry's address field is null/empty after environmentSubstitute, i.e. the configured reply address variable resolved to nothing.","commonSituations":"Mail job entry missing its destination/reply address; ${VARIABLE} unset in the job's run environment; field cleared accidentally in the job dialog and saved.","solutions":["Edit the Mail job entry and set the address field to a valid email address.","Define any referenced variables (kettle.properties, job-level parameters) with non-empty values before the job runs.","Validate the entry configuration with the job's built-in check before scheduling it."],"exampleFix":"// before\nreplyAddress = \"${ALERT_TO}\"; // ALERT_TO undefined\n// after\nreplyAddress = \"alerts@example.com\"; // or define ALERT_TO in kettle.properties","handlingStrategy":"validation","validationCode":"String addr = environmentSubstitute(replyAddress);\nif (addr == null || addr.trim().isEmpty()) {\n  throw new KettleException(\"Mail job entry: reply/destination address is empty; set it or define the referenced variable.\");\n}","typeGuard":null,"tryCatchPattern":"try { executeMailEntry(); } catch (MessagingException e) { jobResult.setResult(false); logError(\"Mail job entry failed: check address config: \" + e.getMessage(), e); }","preventionTips":["Fill the address field in the Mail job entry dialog before saving.","Define all ${VARS} used by job entries in kettle.properties or job parameters.","Use the job entry's validation/check before scheduling."],"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"}