You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Anjul Srivastava <an...@anjul.com> on 2006/03/30 11:32:09 UTC

JavaMail

Could somebody please give me a quick summary of how to install Sun's JavaMail implementation into geronimo?  Or a web link that explains how?

The tutorial I found at IBM's site did not work out for me, probably because it relates to an older version.  I couldn't find anything else that was comprehensive (that is that did not already assume I knew how to configure things about geronimo)

I am a new geronimo user.  I got the 1.0 tar.gz and unzipped it into /usr/local on my Linux Fedora Core 2 server.  I do not know much beyond that.

Background on how far I got so far:  A short mail program didn't work because it complained about not finding "smtp."  I read the mailing lists on this, and understood that you can't include Sun's impl. due to license issues.  Next I downloaded Sun's implementation mail.jar and activation.jar and put them in the WEB-INF/lib directory of my web-app.  That made things smoother, but not close to perfect.  The problem was that certain methods were unimplmented (something like setting the file name of an attachment.)  More importantly, attachments that I create show up weird in my email as if they were one large chunk of plain-text.  When I ran the same code through jboss, they came through normal as separate attachments and also setting the file name of the attachment worked fine.

If only I could install the Sun implementation into geronimo, I wouldn't need to revert back to jboss.  (plaintive whine intended to earn sympathy from jboss-disliking-gernonimo-gurus)

Thanks,
Anjul.

Re: JavaMail

Posted by Rick McGuire <ri...@gmail.com>.
Anjul Srivastava wrote:
> Could somebody please give me a quick summary of how to install Sun's 
> JavaMail implementation into geronimo?  Or a web link that explains how?
>  
> The tutorial I found at IBM's site did not work out for me, probably 
> because it relates to an older version.  I couldn't find anything else 
> that was comprehensive (that is that did not already assume I knew how 
> to configure things about geronimo)
>  
> I am a new geronimo user.  I got the 1.0 tar.gz and unzipped it into 
> /usr/local on my Linux Fedora Core 2 server.  I do not know much 
> beyond that.
>  
> Background on how far I got so far:  A short mail program didn't work 
> because it complained about not finding "smtp."  I read the mailing 
> lists on this, and understood that you can't include Sun's impl. due 
> to license issues.  Next I downloaded Sun's implementation mail.jar 
> and activation.jar and put them in the WEB-INF/lib directory of my 
> web-app.  That made things smoother, but not close to perfect.  The 
> problem was that certain methods were unimplmented (something like 
> setting the file name of an attachment.) 
This sounds like you're picking up a mixture of the Sun smtp transport 
implementation and the Geronimo javamail API code (which is admittedly 
incomplete in the 1.0 version....as you've already discovered).  The 
simplest solution might be to place the Sun javamail jar files in your 
JVM ext directory, which should force those files to be picked up in 
preference to the Geronimo ones.

Another option might be to replace the Geronimo versions of javamail and 
jaf in the repository.  These are located in 
repository/org.apache.geronimo.specs.  I suspect you might need to 
rename the Sun jar files to have the Geronimo names. 

> More importantly, attachments that I create show up weird in my email 
> as if they were one large chunk of plain-text.  When I ran the same 
> code through jboss, they came through normal as separate attachments 
> and also setting the file name of the attachment worked fine.
I'm working on cleaning up/completing the javamail code for a future 
release.  Any chance you could create a small program that shows the 
sequence of calls you're making so I can verify that this will work 
correctly using the new code?  This doesn't even need to run inside of 
Geronimo, just a small class that sends an email using Sun's versions 
should do.
>  
> If only I could install the Sun implementation into geronimo, I 
> wouldn't need to revert back to jboss.  (plaintive whine intended to 
> earn sympathy from jboss-disliking-gernonimo-gurus)
>  
> Thanks,
> Anjul.