Re: [api-dev] Sending email to multiple recipients
Hi Fernand, Am 21.04.2010 10:14, schrieb Fernand Vanrie: Mathias , THanks for the reply, i know how to use the Windows stuf to sen emails from Basic-code, but it complicate things as OO is not aware if Windows has effective send the message... ) I was told that the OO-developpers choose not to build a complete OO-emai-apllicationto and therefor ignored the body property (what was not the case in 001.0) What we need is to send email message from the API when somethings happens in a basicscripts (Document or content are changes etc...). We need not a Fully Email apllication fort that , just a easy and clear way to sent a messages with the OO-API where no further responses are needed from the receiver. Fernand Hi, Fernand Vanrie wrote: Paolo , Andrew, all Can i have hope to set also the body of a email message ? This is not possible by intent, as (at least to my knowledge) the mailto:; protocol we are using for the implementation of this service on most platforms (at the end, it's a simple mail service) does not allow to pass a body text to the mail client. The API has not only the XSimpleMailMessage interface, but a complete module com.sun.star.mail, where you find the (unpublished) XMailMessage interface with access to the body. Nobody could tell me how to work with this, so I suppose a legal problem here. Regards Peter - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Sending email to multiple recipients
Hi, On 22.04.2010 15:03, Peter Eberlein wrote: The API has not only the XSimpleMailMessage interface, but a complete module com.sun.star.mail, where you find the (unpublished) XMailMessage interface with access to the body. Nobody could tell me how to work with this, so I suppose a legal problem here. These interfaces are implemented in the mailing service of mail merge (see scripting/source/pyprov/mailmerge.py). But that does not interact with the system's mail client but with the configured SMTP server directly. Regards, Oliver - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Sending email to multiple recipients
Oliver, Have you any idea if in the future we could have acces to the body using the published API stuff. Is it true that STAROFFICE can do the job ? Fernand On 22.04.2010 15:03, Peter Eberlein wrote: The API has not only the XSimpleMailMessage interface, but a complete module com.sun.star.mail, where you find the (unpublished) XMailMessage interface with access to the body. Nobody could tell me how to work with this, so I suppose a legal problem here. These interfaces are implemented in the mailing service of mail merge (see scripting/source/pyprov/mailmerge.py). But that does not interact with the system's mail client but with the configured SMTP server directly. Regards, Oliver - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Sending email to multiple recipients
Hi, Fernand Vanrie wrote: Paolo , Andrew, all Can i have hope to set also the body of a email message ? This is not possible by intent, as (at least to my knowledge) the mailto:; protocol we are using for the implementation of this service on most platforms (at the end, it's a simple mail service) does not allow to pass a body text to the mail client. It could work with the MAPI based implementation on Windows, but if you write platform specific code, you don't need a platform independent API for that. Regards, Mathias -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to nospamfor...@gmx.de. I use it for the OOo lists and only rarely read other mails sent to it. - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Sending email to multiple recipients
There are ways to send email from python, not sure if is a complete solution for you but maybe it willl help if its like something of personal use: #!/usr/bin/python import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase from email.MIMEText import MIMEText from email import Encoders import os import sys import urllib gmail_user = y...@gmail.com gmail_pwd = ** def mail(to, subject, text): msg = MIMEMultipart() msg['From'] = ottoc...@openoffice.org msg['To'] = to msg['Subject'] = subject mailServer = smtplib.SMTP(smtp.gmail.com, 587) mailServer.ehlo() mailServer.starttls() mailServer.ehlo() mailServer.login(gmail_user, gmail_pwd) mailServer.sendmail(y...@email.com, to, msg.as_string()) # Should be mailServer.quit(), but that crashes... mailServer.close() if len(sys.argv) == 3: url = 'http://tinyurl.com/api-create.php?url=' + sys.argv[2] abre = urllib.urlopen(url) tiny = . + abre.read() mail(s...@email.com, sys.argv[1] + tiny, insert message) elif len(sys.argv) == 2: mail(s...@email.com, sys.argv[1], insert message) else: print Te falto comandos This is a modified code to send email to a specific email account and shorten links through tinyurl. If you dont need this you can ignore the second part of the script. Also if you want to On Wed, Apr 21, 2010 at 1:58 AM, Mathias Bauer nospamfor...@gmx.de wrote: Hi, Fernand Vanrie wrote: Paolo , Andrew, all Can i have hope to set also the body of a email message ? This is not possible by intent, as (at least to my knowledge) the mailto:; protocol we are using for the implementation of this service on most platforms (at the end, it's a simple mail service) does not allow to pass a body text to the mail client. It could work with the MAPI based implementation on Windows, but if you write platform specific code, you don't need a platform independent API for that. Regards, Mathias -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to nospamfor...@gmx.de. I use it for the OOo lists and only rarely read other mails sent to it. - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org -- Alexandro Colorado OpenOffice.org Español http://es.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Sending email to multiple recipients
Mathias , THanks for the reply, i know how to use the Windows stuf to sen emails from Basic-code, but it complicate things as OO is not aware if Windows has effective send the message... ) I was told that the OO-developpers choose not to build a complete OO-emai-apllicationto and therefor ignored the body property (what was not the case in 001.0) What we need is to send email message from the API when somethings happens in a basicscripts (Document or content are changes etc...). We need not a Fully Email apllication fort that , just a easy and clear way to sent a messages with the OO-API where no further responses are needed from the receiver. Fernand Hi, Fernand Vanrie wrote: Paolo , Andrew, all Can i have hope to set also the body of a email message ? This is not possible by intent, as (at least to my knowledge) the mailto:; protocol we are using for the implementation of this service on most platforms (at the end, it's a simple mail service) does not allow to pass a body text to the mail client. It could work with the MAPI based implementation on Windows, but if you write platform specific code, you don't need a platform independent API for that. Regards, Mathias - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Sending email to multiple recipients
Alexandro , Thanks for the code, i certenly have to dive in PyThon, for the moment I know mi way into Basic. I built Basic apllications wher i need to send some messages to infoirm other users that somethins is appen with some Document or Content. I trye to combine Basic and you Python code, ji hope that i can know in Basic it the message is sucfuly send by python or not... Fernand There are ways to send email from python, not sure if is a complete solution for you but maybe it willl help if its like something of personal use: #!/usr/bin/python import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase from email.MIMEText import MIMEText from email import Encoders import os import sys import urllib gmail_user = y...@gmail.com gmail_pwd = ** def mail(to, subject, text): msg = MIMEMultipart() msg['From'] = ottoc...@openoffice.org msg['To'] = to msg['Subject'] = subject mailServer = smtplib.SMTP(smtp.gmail.com, 587) mailServer.ehlo() mailServer.starttls() mailServer.ehlo() mailServer.login(gmail_user, gmail_pwd) mailServer.sendmail(y...@email.com, to, msg.as_string()) # Should be mailServer.quit(), but that crashes... mailServer.close() if len(sys.argv) == 3: url = 'http://tinyurl.com/api-create.php?url=' + sys.argv[2] abre = urllib.urlopen(url) tiny = . + abre.read() mail(s...@email.com, sys.argv[1] + tiny, insert message) elif len(sys.argv) == 2: mail(s...@email.com, sys.argv[1], insert message) else: print Te falto comandos This is a modified code to send email to a specific email account and shorten links through tinyurl. If you dont need this you can ignore the second part of the script. Also if you want to On Wed, Apr 21, 2010 at 1:58 AM, Mathias Bauer nospamfor...@gmx.de wrote: Hi, Fernand Vanrie wrote: Paolo , Andrew, all Can i have hope to set also the body of a email message ? This is not possible by intent, as (at least to my knowledge) the mailto:; protocol we are using for the implementation of this service on most platforms (at the end, it's a simple mail service) does not allow to pass a body text to the mail client. It could work with the MAPI based implementation on Windows, but if you write platform specific code, you don't need a platform independent API for that. Regards, Mathias -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to nospamfor...@gmx.de. I use it for the OOo lists and only rarely read other mails sent to it. - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Sending email to multiple recipients
Hi just a thought if OOo Api can attach a file, create a plain-text file and write your body in it then send this file as attachment may work Laurent - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Sending email to multiple recipients
Laurent , I know but a attachment for a simple message is - a bit rediculous and time consuming when send to our own workflow organisation - and always -spam- suspicious for outsiders fernand Hi just a thought if OOo Api can attach a file, create a plain-text file and write your body in it then send this file as attachment may work Laurent - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
Re: [api-dev] Sending email to multiple recipients
Paolo , Andrew, all Can i have hope to set also the body of a email message ? Fernand Andrew Douglas Pitonyak ha scritto: When I looked at the service definitions, I thought that I should be able to send an email message to multiple people at one time. The setCCRecipient, for example, accepts a list of email addresses. Only the first address is used. I tested on Linux using Thunderbird. Does this seem correct? Shall I open a bug against this? IIRC the same problem affects the setAttachement() method also: in Linux (Thunderbird) only the first element of the sequence is actually attached to the created email message. ciao Paolo M - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org
[api-dev] Sending email to multiple recipients
When I looked at the service definitions, I thought that I should be able to send an email message to multiple people at one time. The setCCRecipient, for example, accepts a list of email addresses. Only the first address is used. I tested on Linux using Thunderbird. Does this seem correct? Shall I open a bug against this? Sub SendSimpleMail_multiple() Dim vMailSystem, vMail, vMessage vMailSystem = createUnoService( com.sun.star.system.SimpleCommandMail ) 'vMailSystem=createUnoService(com.sun.star.system.SimpleSystemMail) vMail=vMailSystem.querySimpleMailClient() vMessage = vMail.createSimplemailMessage() vMessage.SetRecipient(jashmore@teamcertified.com) vMessage.setCCRecipient(Array(and...@pitonyak.org, te...@pitonyak.org)) vMessage.setBCCRecipient(Array(te...@pitonyak.org, te...@pitonyak.org)) vMessage.setsubject(Test Message from and...@pitonyak.org) vMail.sendSimpleMailMessage(vMessage, _ com.sun.star.system.SimpleMailClientFlags.NO_USER_INTERFACE) End Sub -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt My Book: http://www.hentzenwerke.com/catalog/oome.htm Info: http://www.pitonyak.org/oo.php See Also: http://documentation.openoffice.org/HOW_TO/index.html - To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org