<?xml version="1.0" encoding="UTF-8"?>
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">

	<module name="message" package="com.axelor.apps.message.db" />

	<entity name="EmailAccount" lang="java">

		<string name="name" title="Name" required="true" namecolumn="true" />
		<integer name="serverTypeSelect" title="Server Type" required="true" selection="mail.account.server.type.select" default="1"/>
		<string name="login" title="Login"/>
		<string name="password" title="Password" />
		<string name="host" title="Host" required="true"/>
		<integer name="port" title="Port" min="1" nullable="true"/>
		<integer name="securitySelect" title="SSL/STARTTLS" selection="mail.account.security.select"/>
		<boolean name="isDefault" title="Default account"/>
		<boolean name="isValid" title="Valid"/>
		<string name="signature" title="Signature" large="true"/>

		<extra-code><![CDATA[
	
		// SERVER TYPE SELECT
		public static final int SERVER_TYPE_SMTP = 1;
		public static final int SERVER_TYPE_POP = 2;
		public static final int SERVER_TYPE_IMAP = 3; 
		
		// SECURITY TYPE SELECT
		public static final int SECURITY_NONE = 0;
		public static final int SECURITY_SSL = 1;
		public static final int SECURITY_STARTTLS = 2;
	
		]]></extra-code>

	</entity>

</domain-models>
