1 // Copyright 2000-2005 the Contributors, as shown in the revision logs.
2 // Licensed under the Apache Public Source License 2.0 ("the License").
3 // You may not use this file except in compliance with the License.
5 package org.ibex.mail.target;
8 import org.ibex.util.*;
9 import org.ibex.mail.*;
10 import org.ibex.mail.target.*;
12 public class Reject extends JS.Obj implements Target {
13 public final String reason;
14 public Reject(String reason) { this.reason = reason; }
15 public void accept(Message m) throws IOException, MailException {
16 throw new RejectException(m, reason);
18 public static class RejectException extends RuntimeException {
19 public final Message m;
20 public final String reason;
21 public RejectException(Message m, String reason) { this.m = m; this.reason = reason; }