Forum at OOoForum.orgThe Forum
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

javamail in openoffice 2.0 RC

Post new topic   Reply to topic Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message

Joined: 13 Oct 2005
Posts: 1

PostPosted: Thu Oct 13, 2005 7:28 am    Post subject: javamail in openoffice 2.0 RC Reply with quote

I have the same problem like Steve.
Working with Windows XP SP2, OO 2.0 RC, java RTE 5,...

Steves question:
Does anyone have a good FAQ on how to install JavaMail so it works with OpenOffice? I frequently need to do merge-to-email and I can't make it work with OO. OO says to install JavaMail from Sun and I did that, but it doesn't seem to do anything. I tried "yum install javamail" and it installed a couple of packages, but again OO doesn't want to do a merge to email.

It's so simple in Word! <sigh>

Back to top
View user's profile Send private message
Power User
Power User

Joined: 08 May 2005
Posts: 50

PostPosted: Thu Oct 13, 2005 1:06 pm    Post subject: Reply with quote

Javamail...isnt that Sun's API for writing, sending, emails and so on? How is that related with OOo?
Back to top
View user's profile Send private message
General User
General User

Joined: 02 Nov 2005
Posts: 20

PostPosted: Wed Nov 02, 2005 11:02 pm    Post subject: Reply with quote

AFter much frustration, I found out that it doesn't work no matter what you do with JavaMail -

read my doc here for what I found and how you can get it to work --

Aaron W

also here is the text of that doc, pasted in:

Fun with email merge!

So for a long time I've been trying to get this to work – apparently it worked in very early versions of, but then was later dropped. However, there was talk and talk and talk of it being finally included in version 2 – and all the early beta versions of 2.0 (1.9.xxxx, etc) all looked like they included the option. So every month or two I would grab the latest release and try it out -

The message that it gives you is that it cannot find JavaMail, which it claims it needs to do the email merge. However, no matter which way I tried to install Java and JavaMail (including going to “Tools – Options” in and adding javamail and its required jaf to the classpath), OOo would not recognize it and install it.

So after much digging and frustration I came across the sinister truth -

According to,

“the message to install Java Mail doesn't tell the complete truth. To

access the Java Mail API from the mail merge wizard requires an

additional service ( ) that is not

availabe for OOo, and an additional configuration entry.

Sorry, I cannot answer the question how to get it.”

So for some reason that text was still left in there from StarOffice (I'm assuming), even though actual code to implement it was taken out of Which is so annoying and misleading. I'm sure I'm not the only one to spend hours attempting to install JavaMail in frustration. And there seems to be no official posting or FAQ that lets us know this. Which is why I'm putting together this document.

So no matter how you install JavaMail, (which also, by the way, requires you to install the javabeans activation framework from Sun), the email merge will not work.

Good news, however, I finally figured out how to get it to work!

Apparently there's a patch to the source code to implement this,,

but I myself am not sure how to use this – I'm not up to compiling the code myself, especially if I need to patch something in first. And it's unclear when it's going to make it into a release. Hopefully soon.

But until then, I found that the same python code that works that patch can be installed in a different way -

Here's how I got it to work -

This guy Caolan wrote this python code and posted it on his blog -

here is the python file:

Thank you very much Caolan!!

I've put it locally here just in case:

But he doesn't make it too clear how to go about using it. The instructions are actually in the comments at the top of the python file.

I'm using OOo 2.0 on Windows XP, his instructions are for linux.

You should probably be out of OpenOffice (close the program) when you do all of this.

copy into the /program/ subfolder of the program folder

(In windows, this is most likely at C:\Program Files\ 2.0\program\, in linux I guess it's /usr/lib/openoffice.org2.0/program/ or something close)

in the /program/ folder there is also an executable called “unopkg”. Go to a command line if not already, switch to the 2.0/program/ folder, and type:

“unopkg add –-shared” (in linux you would have to type ./unopkg instead of just unopkg, i think)

(note for command-line dummies: you have to press “enter” after the command to make it work)

Then you need to change one value in the Writer.xcu file, which is located in your home directory.

In my windows XP installation, I found it at

C:\Documents and Settings\My Username\Application Data\OpenOffice.org2\


Substitute “My Username” for the username of the account you're using.

In Linux, apparently it's at


where the tilde (~) represents your home directory (typically /home/your username/).

Depending on how you go about getting to the file, you may need to turn on viewing of hidden folders.

Open the Writer.xcu file in a text editor (ie, Notepad) and then find (Ctrl-F) the part of the file that says this:

<prop oor:name="EMailSupported" oor:type="xs:boolean">



and change the “false” value to “true”.

Then get back into openOffice. That's what I did and now the email merge works for me. It even did my SMTP server authentication.

I found the mail merge interface to be a bit clunky on both versions of openOffice, but finally I figured it out with the help of the help file. Once you get the trick of mail merging down, the email merge is easy to figure.

I can't stand the prepackaged “address block” and “salutation” things because they never match my fieldnames – and the dang wizard doesn't tell you how to put in your own fields outside of the salutation and address block –

so on step 6, the “Edit Document” step, I hit “Edit Document”, then F4 to pull up the data explorer, pull up my data source table in the data explorer, and put in the fields by dragging the field headers down. You can also hit Ctrl-F2, which is the “Insert Fields” shortcut, then go to the “Data” tab, then go to “Mail Merge Fields” and drag them from there. It works well, but is counterintuitive and not obvious at all to me, who am used to mail merges in Adobe Pagemaker, Avery Designer, and MS Word.

Also I found it very confusing that you can't do a label merge by starting from the “Mail Merge Wizard” - I find where I work, we do merges to labels much more often than we do merges to letters. Being used to Micro$quish Word, I was not at all inclined to start looking under “File – New – Labels” - which is what you have to do. In MS, you go to Mail Merge Wizard under Tools, and the option for Labels is there – one place to go for all mail merges.

Ah well. At least it works, it is much improved over OOo 1.x series, and it covers it in the help file.

Enough ranting. I hope this clears things up and works for others, as it did for me. I think it will.

Happy email merging!!!

Aaron W

feedback on this doc? I'd love to hear it –
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Forum Index -> General Discussion All times are GMT - 8 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group