You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Jeremy Boynes <jb...@apache.org> on 2005/04/23 14:11:09 UTC
Re: using JavaMail
Katia Aresti Gonzalez wrote:
> Hi!!
>
> I just want to know if somebody can help me to use Javamail with Geronimo. what
> do i need to start?
>
Add a mail resource with something like:
<gbean name="mail/MailSession"
class="org.apache.geronimo.mail.MailGBean">
<attribute name="properties">
mail.smtp.host=mail.apache.com
</attribute>
</gbean>
(use your mail server and any access properties if it needs them)
You may also need to add a dependency on geronimo-mail
Then in you application you should be able to use this by getting a
Session from JNDI:
Session sess = (Session) ctx.lookup("java:comp/env/mail/MailSession");
Once you have the session it should be JavaMail as usual.
--
Jeremy