pentaho/pentaho-kettle · error · MessagingException

JobMail.Error.ReplyEmailNotFilled

Error message

JobMail.Error.ReplyEmailNotFilled

What it means

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.

Solutions

  1. Edit the Mail job entry and set the address field to a valid email address.
  2. Define any referenced variables (kettle.properties, job-level parameters) with non-empty values before the job runs.
  3. Validate the entry configuration with the job's built-in check before scheduling it.

Example fix

// before
replyAddress = "${ALERT_TO}"; // ALERT_TO undefined
// after
replyAddress = "alerts@example.com"; // or define ALERT_TO in kettle.properties
Defensive patterns

Strategy: validation

Validate before calling

String addr = environmentSubstitute(replyAddress);
if (addr == null || addr.trim().isEmpty()) {
  throw new KettleException("Mail job entry: reply/destination address is empty; set it or define the referenced variable.");
}

Try / catch

try { executeMailEntry(); } catch (MessagingException e) { jobResult.setResult(false); logError("Mail job entry failed: check address config: " + e.getMessage(), e); }

Prevention

When it happens

Trigger: The job entry's address field is null/empty after environmentSubstitute, i.e. the configured reply address variable resolved to nothing.

Common situations: 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.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/13560a0ee5b45376. Report an issue: GitHub.

Appendix: source

Thrown at plugins/mail-job/impl/src/main/java/org/pentaho/di/job/entries/mail/JobEntryMail.java:1036

        msg.setHeader( "X-Priority", priorityAsInt ); // (String)int between 1= high and 3 = low.
        msg.setHeader( "Importance", importance );
        // seems to be needed for MS Outlook.
        // where it returns a string of high /normal /low.
        msg.setHeader( "Sensitivity", sensitivity );
        // Possible values are normal, personal, private, company-confidential
      }

      // Set Mail sender (From)
      String senderAddress = environmentSubstitute( replyAddress );
      if ( !Utils.isEmpty( senderAddress ) ) {
        String senderName = environmentSubstitute( replyName );
        if ( !Utils.isEmpty( senderName ) ) {
          senderAddress = senderName + '<' + senderAddress + '>';
        }
        msg.setFrom( new InternetAddress( senderAddress ) );
      } else {
        throw new MessagingException( BaseMessages.getString( PKG, "JobMail.Error.ReplyEmailNotFilled" ) );
      }

      // set Reply to addresses
      String reply_to_address = environmentSubstitute( replyToAddresses );
      if ( !Utils.isEmpty( reply_to_address ) ) {
        // Split the mail-address: space separated
        String[] reply_Address_List = environmentSubstitute( reply_to_address ).split( " " );
        InternetAddress[] address = new InternetAddress[reply_Address_List.length];
        for ( int i = 0; i < reply_Address_List.length; i++ ) {
          address[i] = new InternetAddress( reply_Address_List[i] );
        }
        msg.setReplyTo( address );
      }

      // Split the mail-address: space separated
      String[] destinations = environmentSubstitute( destination ).split( " " );
      InternetAddress[] address = new InternetAddress[destinations.length];
      for ( int i = 0; i < destinations.length; i++ ) {

View on GitHub (pinned to f3058517a1)