My first cut at a pyuno email mail merge component for OpenOffice.org. As mentioned StarOffice comes with one, but OpenOffice.org doesn’t. This simple implementation even works already for basic SMTP transfer. See..
.
Some work to do to add some of the authentication options, attachments and non-hacky installation (see top of script for quick and dirty installation), but bascially in good shape and semi-usable already. python and pyuno are definitely the best and easiest way to write a uno component for OOo.
Huh!
It’s a great news. I hope you can improve it in the next weeks, and It could be par of OOo 2.0 or 2.01…
You should open an issue for this as TASK. I will vote for it.
Thanks,
KAMI
Cool, and surprisingly little code. Handy that those nice StarOffice guys have provided the UI
Keep up the good work!
This looks extremely nice. But where, exactly, in the writer.xcu file, am I supposed to add the EmailEnabled section? Or does it not matter?
for some reason ./unopkg did not work for me, so I added mailmerge.py to ‘My Packages’ using OOo Menu – Tools-Package Manager and then reboot.
works well.
thanks
GREAT! So how do I get/install it?
I’ve tried following the instructions under Windows XP – but they don’t seem to work. Does this only work under Linux? Could something like DicOoo be developed for installing it for dummies like me?
hi
What should i be doing to get delivery reports from the emails sent?
I want to get the “delivery and read reports” for sent mails.
What can i do?
I want to get “Delivery Reports” and “Read Reports” (receipts) for the mails sent.
What should i do?
Hello,
and my english is very bad ;p). It works with OOo 2.0 (french version) on Windows XP.
I’m not a python developper but i have modified the script to send mail (plain text) with accentued char (i’m french
Where can i send you my modification ?
Thanks,
Hello,
I don’t know if my precedent post was sent…
I’m not a python developper but i have modified your script to send mail in plain text with accentued char (i’m french, and very bad in english ;p).
Where can i send you my modifications ?
thanks,
To Andrew brown – you have to find the part of the Writer.xcu file where it says:
false
And change the “false” to a “true”
Steve – in windows, you just go to the c:\program files\openoffice.org 2.0\program\ in a command line, and run “unopkg” instead of “./unopkg” – ./ is linux notation for “run this” –
David – the link is above – on the text “first cut” – for howto see this page I put up:
http://internet.cybermesa.com/~aaron_w/OOo_email_merge/OOo_email_merge.html
Danny – Got it to work on WinXP – see my doc at url above.
Fevzi – I don’t think that option is implemented. If you want to hack some python on this script I’m sure you could implement it.
Aaron W
Please see my doc at http://internet.cybermesa.com/~aaron_w/OOo_email_merge/OOo_email_merge.html for more info on this – was able to get it to work for Win XP. Thanks caolan!
do these comments work? I can’t get mine to show -
Do you still need to have JavaMail installed for this to work? I have followed Aaron W’s doc, but no luck.
John
I got this to work also using aaron_w’s notes and comments; however, it appears to fail when there is a badly formed smtp address in the addresses table. It seems to then be impossible to resume the sending. I can provide the details to someone if they would be helpful in making a further fix.
i installed mailmerge follow the instruction http://internet.cybermesa.com/~aaron_w/OOo_email_merge/OOo_email_merge.html . It works fine when execute mailmerge to email in OpenOffice 2.0. But When i use API for execute mailmerge in VB.NET program. It doesn’t work correctly, at the first time, when i do that, i work fine, but later it sometimes sends email but it almost doesn’t delivers to the correct email address, although the execute method of mailmerge return True.
Could someone figure out how to fix that.
Thank you very much.
namvo
I don’t seem to have the “EMailSupported” property in my Writer.xcu. Can anyone tell me what node to hang it off of?
Thanks!
I attempted to follow the instructions, but I don’t seem to have the “EMailSupported” property in my Writer.xcu. Can anyone tell me what node to hang it off of? (or better yet, post an email merge-functional Writer.xcu?)
Thanks!
Marc. Your’re looking in the wrong folder. There is more than one copy of that file in, at least on in the open office folder and one (windows) in the “C:\Documents and Settings\My Username\Application Data\OpenOffice.org2\user\registry\data\org\openoffice\Office\Writer.xcu” folder.
I have tried mailmerge.py in OOo v2 and there is a bug when emailing to merge in the Biblio database names. If the Author field contains an extended charset character, it generates an error if you choose Plain Text as the message format. See below:
exceptions.UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xf6′ in position 33: ordinal not in range(128), traceback follows
File “”, line 183, in sendMailMessage
File “C:\Program Files\OpenOffice.org 2.0\program\python-core-2.3.4\lib\email\Message.py”, line 130, in as_string
g.flatten(self, unixfrom=unixfrom)
File “C:\Program Files\OpenOffice.org 2.0\program\python-core-2.3.4\lib\email\Generator.py”, line 102, in flatten
self._write(msg)
File “C:\Program Files\OpenOffice.org 2.0\program\python-core-2.3.4\lib\email\Generator.py”, line 130, in _write
self._dispatch(msg)
File “C:\Program Files\OpenOffice.org 2.0\program\python-core-2.3.4\lib\email\Generator.py”, line 156, in _dispatch
meth(msg)
File “C:\Program Files\OpenOffice.org 2.0\program\python-core-2.3.4\lib\email\Generator.py”, line 202, in _handle_text
self._fp.write(payload)
Funny – it doesn’t look as if it is using your code so the bug might have nothing to do with you…
Please don’t submit bugreports to the comment area
Please submit them to qa.openoffice.org, feel free to cc cmc@openoffice.org (me also) on those reports though
Would it be a big effort to implement a python script for SMTP generally?
The com.sun.star.mail.MailServiceProvider isn’t really supported in StarBasic, see
http://www.oooforum.org/forum/viewtopic.phtml?t=42500
Peter