Mail Archive Home | exoplatform List | October 2006 Index
| <-- Date Index --> | <-- Thread Index --> |
First you must configure the MailService:In your portlet you must obtain the MailService from the container: PortalContainer portalContainer = PortalContainer.getInstance(); MailService mailService = (MailService) portalContainer.getComponentInstanceOfType( MailService.class ); then you can use the MailService methods to send your email. Bye Luca+ m.heidari@xxxxxxxxxxxxx wrote: Hello, my portlet need to send mail function.i use MailServiceImpl.java but it require params(MailServiceImpl(InitParams params))and i don't khonw how set this params. please help me how can i send email in my portlet. Thanks M.Heidari |
<?xml version="1.0" encoding="ISO-8859-1"?>
<configuration>
<component>
<key>org.exoplatform.services.mail.MailService</key>
<type>org.exoplatform.services.mail.impl.MailServiceImpl</type>
<init-params>
<properties-param>
<name>config</name>
<property name="mail.smtp.host" value="smtp.yourcompany.com" />
<property name="mail.smtp.port" value="25" />
<property name="mail.transport.protocol" value="smtp" />
<property name="mail.smtp.auth" value="false" />
<!--
<property name="mail.smtp.auth.username" value="" />
<property name="mail.smtp.auth.password" value="" />
-->
<property name="mail.smtp.from" value="sender@xxxxxxxxxxxxxxx" />
</properties-param>
</init-params>
</component>
</configuration>
begin:vcard fn:Luca Bernardini n:Bernardini;Luca org:digisol;sviluppo adr:;;via Flaminia, 134/N;Rimini;RN;47900;Italy email;internet:luca.bernardini@xxxxxxxxxx tel;work:0541 382570 tel;fax:0541 309143 x-mozilla-html:TRUE url:http://www.digisol.it version:2.1 end:vcard
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.