eXo Mail Configuration
How to deploy eXo Mail Application
You should have 'cs-plugins-configuration.xml' in exo.cs.web.portal project. How to configurate eXo Mail in eXo Portal In cs-plugins-configuration.xml file, you have to define some elements like these: to create default accout for each user, normally, when an user works with eXo portal, User uses organization portlet to create new user, so the eXo Mail service will create default account for the created user. To do that, you have to configure like:<component-plugin> <name>mail.new.user.event.listener</name> <set-method>addListenerPlugin</set-method> <type>org.exoplatform.mail.service.impl.NewUserListener</type> <description>description</description> </component-plugin> <component-plugin> <name>mail.new.membership.event.listener</name> <set-method>addListenerPlugin</set-method> <type>org.exoplatform.mail.service.impl.NewMembershipListener</type> <description>description</description> </component-plugin>
<component-plugin> <name>mail.new.user.event.listener</name> <set-method>addListenerPlugin</set-method> <type>org.exoplatform.mail.service.impl.NewUserListener</type> <description>description</description> <init-params> <value-param> <name>protocol</name> <value>imap</value> </value-param> <value-param> <name>ssl</name> <value>false</value> </value-param> <value-param> <name>incomingServer</name> <value>in</value> </value-param> <value-param> <name>incomingPort</name> <value>143</value> </value-param> <value-param> <name>incomingFolder</name> <value>Inbox</value> </value-param> <value-param> <name>outgoingServer</name> <value>out</value> </value-param> <value-param> <name>outgoingPort</name> <value>25</value> </value-param> </init-params> </component-plugin>
Usage of eXo Mail API
Import eXo Mail Service to your portlet
Insert this code snippet to pom.xml file of your portlet.<dependency> <groupId>org.exoplatform.cs</groupId> <artifactId>exo.cs.eXoApplication.mail.service</artifactId> <version>1.0</version> </dependency>
Usage of API
eXo Mail Service provides all APIs for working with mail as send mail, check mail, store mail to JCR… but maybe in other portlets only use send mail function to send an email. Send mail :You can use the following APIs to send an email :public void sendMessages(List<Message> msgList, ServerConfiguration serverConfig) throws Exception ;
public Message sendMessage(SessionProvider sProvider, String username, String accId, Message message) throws Exception ;
public Message sendMessage(SessionProvider sProvider, String username, Message message) throws Exception ;- Relationship between eXo Mail and other portlets in eXo Collaboration Suite
on 22/07/2008 at 03:04