All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mailster.smtp.api.handler.RejectException Maven / Gradle / Ivy

There is a newer version: 1.0.6
Show newest version
package org.mailster.smtp.api.handler;

/**
 * Thrown to reject an SMTP command with a specific code.
 *
 * @author De Oliveira Edouard <[email protected]>
 * @author Jeff Schnitzer
 */
public class RejectException extends Exception {

    private static final long serialVersionUID = -2518325451992929294L;

    /**
     * The smtp error code
     */
    int code;

    public RejectException() {
        this(554, "Transaction failed");
    }

    public RejectException(int code, String message) {
        super(code + " " + message);

        this.code = code;
    }

    /**
     * Returns the smtp error code.
     */
    public int getCode() {
        return this.code;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy