Elephant allows sending direct emails through the Mail API. This method is used, for instance, when sending activity emails from BrightSide Dossiers module.
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 MailReaders is a
|
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. |
<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>
<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>