001 /*
002 * Copyright 2010 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package com.hs.mail.smtp;
017
018 /**
019 *
020 * @author Won Chul Doh
021 * @since May 30, 2010
022 *
023 */
024 public class SmtpException extends RuntimeException {
025
026 private static final long serialVersionUID = 1L;
027
028 public static final String RECIPIENTS_COUNT_LIMIT = "452 4.5.3 Maximum recipients reached";
029
030 public static final String DOMAIN_NAME_LENGTH_LIMIT = "501 5.5.0 Domain name length exceeds fixed limit";
031
032 public static final String CANNOT_DECODE_PARAM = "501 5.5.4 Could not decode parameters";
033
034 public static final String INVALID_SIZE_PARAM = "501 5.5.4 Syntactically incorrect value for SIZE parameter";
035
036 public static final String INVALID_COMMAND_PARAM = "501 5.5.4 Invalid command parameters";
037
038 public static final String MISSING_DOMAIN_ADDRESS = "501 5.5.4 Domain address required";
039
040 public static final String MISSING_RECIPIENT_ADDRESS = "501 5.5.4 Missing recipient address";
041
042 public static final String MISSING_SENDER_ADDRESS = "501 5.5.4 Missing sender address";
043
044 public static final String EXPN_NOT_SUPPORTED = "502 5.3.3 EXPN is not supported";
045
046 public static final String VRFY_NOT_SUPPORTED = "502 5.3.3 VRFY is not supported";
047
048 public static final String ALREADY_AUTHENTICATED = "503 5.5.0 User already authenticated";
049
050 public static final String MESSAGE_SIZE_LIMIT = "552 5.3.4 Message size exceeds fixed maximum message size";
051
052 public static final String COMMAND_OUT_OF_SEQUENCE = "503 5.5.1 Command out of sequence";
053
054 public static final String AUTHTYPE_NOT_SUPPORTED = "504 5.5.1 Unsupported authentication type";
055
056 public static final String AUTH_REQUIRED = "530 5.7.1 Authentication required";
057
058 public static final String AUTH_FAILED = "535 5.7.0 Authentication failed";
059
060 public static final String RELAY_DENIED = "550 5.7.1 Relaying denied";
061
062 public static final String NO_VALID_RECIPIENTS = "554 5.5.0 No valid recipients";
063
064 /**
065 * Constructor for SmtpException.
066 */
067 public SmtpException() {
068 super();
069 }
070
071 /**
072 * Constructor for SmtpException.
073 *
074 * @param message
075 */
076 public SmtpException(String message) {
077 super(message);
078 }
079
080 /**
081 * Constructor for SmtpException.
082 *
083 * @param message
084 * @param cause
085 */
086 public SmtpException(String message, Throwable cause) {
087 super(message, cause);
088 }
089
090 /**
091 * Constructor for SmtpException.
092 *
093 * @param cause
094 */
095 public SmtpException(Throwable cause) {
096 super(cause);
097 }
098
099
100 }