package cn.base.conf;

public class Email extends NodeHome {
	private String smtpHost;
	private String smtpFrom;
	private String smtpLoginName;
	private String smtpLoginPwd;
	private boolean smtpSsl;
		
	public boolean isSmtpSsl() {
		return smtpSsl;
	}

	public void setSmtpSsl(boolean smtpSsl) {
		this.smtpSsl = smtpSsl;
	}


	public String getSmtpHost() {
		return smtpHost;
	}

	public void setSmtpHost(String smtpHost) {
		this.smtpHost = smtpHost;
	}


	public String getSmtpFrom() {
		return smtpFrom;
	}


	public void setSmtpFrom(String smtpFrom) {
		this.smtpFrom = smtpFrom;
	}


	public String getSmtpLoginName() {
		return smtpLoginName;
	}


	public void setSmtpLoginName(String smtpLoginName) {
		this.smtpLoginName = smtpLoginName;
	}


	public String getSmtpLoginPwd() {
		return smtpLoginPwd;
	}


	public void setSmtpLoginPwd(String smtpLoginPwd) {
		this.smtpLoginPwd = smtpLoginPwd;
	}
	public void fillField(){
		for(int i=0;i<this.getList().size();i++){
			String name=this.getList().get(i).getName();
			String value=this.getList().get(i).getValue();
			if(name.equalsIgnoreCase("smtpHost")==true)this.smtpHost = value;
			if(name.equalsIgnoreCase("smtpFrom")==true)this.smtpFrom = value;
			if(name.equalsIgnoreCase("smtpLoginName")==true)this.smtpLoginName = value;
			if(name.equalsIgnoreCase("smtpLoginPwd")==true)this.smtpLoginPwd = value;
			if(name.equalsIgnoreCase("smtpSsl")==true){
				if(value.equalsIgnoreCase("true")==true) this.smtpSsl = true;
				else  this.smtpSsl = false;
			}
		}
	}
}
