⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smtpserver.java

📁 Jodd是一个开源的公用Java基础类库
💻 JAVA
字号:
package jodd.mail;

/**
 * Represents single SMTP server for sending emails.
 *
 * This is part of Jodd.
 *
 * @2do default enoding and the rest params
 * @2do join with POP3?
 */
public class SmtpServer {

	// ---------------------------------------------------------------- construct

	/**
	 * SmtpServer default constructor.
	 */
	public SmtpServer() {
	}

	/**
	 * SMTP server defined with its host.
	 *
	 * @param host   SMTP host address
	 */
	public SmtpServer(String host) {
		this.host = host;
	}

	/**
	 * SMTP server defined with its host and authenitification.
	 *
	 * @param host   SMTP host address
	 */
	public SmtpServer(String host, String username, String password) {
		this.host = host;
		this.username = username;
		this.password = password;
	}

	// ---------------------------------------------------------------- data

	private String host;
	/**
	 * Sets SMTP host address.
	 *
	 * @param host   SMTP host address
	 */
	public void setHost(String host) {
		this.host = host;
	}
	/**
	 * Returns SMTP host address.
	 *
	 * @return SMTP host address
	 */
	public String getHost() {
		return host;
	}


	private String username;
	/**
	 * Sets SMTP authentication username. If username is not set, no
	 * authentification is needed.
	 *
	 * @param username Sets SMTP authentication username.
	 */
	public void setUsername(String username) {
		this.username = username;
	}
	/**
	 * Returns SMTP authentification username
	 *
	 * @return authentification SMTP username
	 */
	public String getUsername() {
		return username;
	}
	

	private String password;
	/**
	 * Sets SMTP authentication password.
	 *
	 * @param password SMTP authentication password
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	/**
	 * Returns SMTP authentication password.
	 *
	 * @return SMTP authentication password
	 */
	public String getPassword() {
		return password;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -