001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.runtime.net.mail; 020 021/** 022 * DTO of a single Mailserver 023 */ 024public interface Server { 025 026 public static final int DEFAULT_PORT = 25; 027 028 /** 029 * @return Returns the password. 030 */ 031 public abstract String getPassword(); 032 033 /** 034 * @return Returns the port. 035 */ 036 public abstract int getPort(); 037 038 /** 039 * @return Returns the server. 040 */ 041 public abstract String getHostName(); 042 043 /** 044 * @return Returns the username. 045 */ 046 public abstract String getUsername(); 047 048 /** 049 * @return if has a authenatication or not 050 */ 051 public abstract boolean hasAuthentication(); 052 053 /** 054 * @return clone the DataSource as ReadOnly 055 */ 056 public abstract Server cloneReadOnly(); 057 058 /** 059 * @return Returns the readOnly. 060 */ 061 public abstract boolean isReadOnly(); 062 063 /** 064 * verify the server properties 065 * @return is ok 066 * @throws SMTPException 067 */ 068 public abstract boolean verify() throws SMTPException; 069 070 071 /** 072 * @return is tls 073 */ 074 public abstract boolean isTLS(); 075 076 /** 077 * @return is ssl 078 */ 079 public abstract boolean isSSL(); 080 081}