Direct emails

Elephant allows sending direct emails through the Mail API. This method is used, for instance, when sending activity emails from BrightSide Dossiers module.

Intercepting responses to direct emails

The Elephant Mail API defines a way for intercepting responses to direct emails. The method requires to declare a MailReader. The usual form to declare a MailReader is in the elephant_[module].xml file.

Processed messages will be flagged as configured in MailReader. The rest will be left as they were.

The xml element for MailReader

The xml element for MailReaders is a <impl interface java-class/> using org.turro.mail.reader.MailReader. The attributes are:

Attribute

Description

mailhost

The mail server domain.

type

The server type. Usually imap, imaps, pop3 or pop3s.

count

Number of messages to retrieve. Defaults to 50.

folder

Folder to read from. Defaults to INBOX.

user

User account.

password

User password, as is. See cryptpass for a more secured method to store passwords.

cryptpass

Password encrypted. Use Tools -> Password generator to generate the encrypted string.

port

Port to connect to.

ssl

Whether use SSL protocol on connect. Server defined.

tls

Whether to encrypt content on connect. Server defined.

flag

Flag to set if the message is processed. Defaults to SEEN.

Example for IMAP protocol on Gmail

<impl interface="IMailReader_Dossier" java-class="org.turro.mail.reader.MailReader">
  <attrib name="mailhost" value="imap.gmail.com"/>
  <attrib name="type" value="imaps"/>
  <attrib name="count" value="10"/>
  <attrib name="user" value="user@gmail.com"/>
  <attrib name="cryptpass" value="xxxxxxx"/>
  <attrib name="port" value="993"/>
  <attrib name="ssl" value="true"/>
  <attrib name="tls" value="false"/>
</impl>

Example for POP3 protocol on Gmail

<impl interface="IMailReader_Dossier" java-class="org.turro.mail.reader.MailReader">
  <attrib name="mailhost" value="pop.gmail.com"/>
  <attrib name="type" value="pop3s"/>
  <attrib name="count" value="10"/>
  <attrib name="user" value="user@gmail.com"/>
  <attrib name="cryptpass" value="xxxxxxx"/>
  <attrib name="port" value="995"/>
  <attrib name="ssl" value="true"/>
  <attrib name="tls" value="false"/>
</impl>
Printer version
English03/22/18 19:24Lluís Turró Cutiller
English04/16/18 12:26Lluís Turró Cutiller