You are viewing a plain text version of this content. The canonical link for it is here.
Posted to api@openoffice.apache.org by whiteice <wh...@free.fr> on 2012/10/16 17:57:39 UTC

Re: [Bug 93995] Enhancement: XSimpleMailMessage.setBody( string body )

Hello,

Thank you for this answer, but I'd like to let see the mail client 
interface and have the possibility to send the mail or not.

With the method described in bug 118791, I managed to send an email with 
attachment and  body but it's an automatic method, it doesn't allow to 
show the mail client doesn't it ?

Do you know a method to set a mail with body and attachment without 
automatic sending ?



Le 13/10/12 13:37, bugzilla@apache.org a écrit :
> https://issues.apache.org/ooo/show_bug.cgi?id=93995
>
> Ariel Constenla-Haile <ar...@apache.org> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |arielch@apache.org
>
> --- Comment #3 from Ariel Constenla-Haile <ar...@apache.org> ---
> (In reply to comment #2)
>> This request has been done a long time ago and it seems that the method
>> setBody(body as string) has not been implemented yet.
>>
>> Could you implement this method or give another way to attach documents,
>> change body and recipient of an Email.
>>
>> Thank you for your answer.
> you can use the more complete com::sun:.star::mail API
> You can find some examples on the attachments to
> bug 118791
> bug 118736
> bug 118814
>
> In case of doubts, there is a dedicated mailing list:
> ooo-api@incubator.apache.org
>



Re: [Bug 93995] Enhancement: XSimpleMailMessage.setBody( string body )

Posted by Alexandro Colorado <jz...@oooes.org>.
StarOffice back in 5.x used to have an email client, when it change to
OO the email client was gone, instead it was develop a bridge to
communicate to the native mail of the OS.

The mail client was an exception and a script was provided to create
mail merge and use the stmp interface of UNO.

Is not really an email client, but just a deamon, and the script calls
it and execute.

The service is ran from OO itself and not an email client.




On 10/16/12, whiteice <wh...@free.fr> wrote:
> Hello,
>
> Thank you for this answer, but I'd like to let see the mail client
> interface and have the possibility to send the mail or not.
>
> With the method described in bug 118791, I managed to send an email with
> attachment and  body but it's an automatic method, it doesn't allow to
> show the mail client doesn't it ?
>
> Do you know a method to set a mail with body and attachment without
> automatic sending ?
>
>
>
> Le 13/10/12 13:37, bugzilla@apache.org a écrit :
>> https://issues.apache.org/ooo/show_bug.cgi?id=93995
>>
>> Ariel Constenla-Haile <ar...@apache.org> changed:
>>
>>             What    |Removed                     |Added
>> ----------------------------------------------------------------------------
>>                   CC|                            |arielch@apache.org
>>
>> --- Comment #3 from Ariel Constenla-Haile <ar...@apache.org> ---
>> (In reply to comment #2)
>>> This request has been done a long time ago and it seems that the method
>>> setBody(body as string) has not been implemented yet.
>>>
>>> Could you implement this method or give another way to attach documents,
>>> change body and recipient of an Email.
>>>
>>> Thank you for your answer.
>> you can use the more complete com::sun:.star::mail API
>> You can find some examples on the attachments to
>> bug 118791
>> bug 118736
>> bug 118814
>>
>> In case of doubts, there is a dedicated mailing list:
>> ooo-api@incubator.apache.org
>>
>
>
>


-- 
Alexandro Colorado
PPMC Apache OpenOffice
http://es.openoffice.org

Re: [Bug 93995] Enhancement: XSimpleMailMessage.setBody( string body )

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hi whiteice,

On Tue, Oct 16, 2012 at 04:08:21PM -0300, Ariel Constenla-Haile wrote:
> On Tue, Oct 16, 2012 at 05:57:39PM +0200, whiteice wrote:
> > Hello,
> > 
> > Thank you for this answer, but I'd like to let see the mail client
> > interface and have the possibility to send the mail or not.
> > 
> > With the method described in bug 118791, I managed to send an email
> > with attachment and  body but it's an automatic method, it doesn't
> > allow to show the mail client doesn't it ?
> > 
> > Do you know a method to set a mail with body and attachment without
> > automatic sending ?
> 
> No, there is no way to do this. com.sun.star.system.SimpleCommandMail
> (Linux) and com.sun.star.system.SimpleSystemMail (Windows) have the bug
> you already know, there is no setBody in XSimpleMailMessage.

FYI http://svn.apache.org/viewvc?rev=1398997&view=rev fixed
https://issues.apache.org/ooo/show_bug.cgi?id=93995 it will be available
in 3.5.0 (if there is no 3.4.2). Sample code attached in bug
https://issues.apache.org/ooo/show_bug.cgi?id=82660


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: [Bug 93995] Enhancement: XSimpleMailMessage.setBody( string body )

Posted by Ariel Constenla-Haile <ar...@apache.org>.
On Tue, Oct 16, 2012 at 05:57:39PM +0200, whiteice wrote:
> Hello,
> 
> Thank you for this answer, but I'd like to let see the mail client
> interface and have the possibility to send the mail or not.
> 
> With the method described in bug 118791, I managed to send an email
> with attachment and  body but it's an automatic method, it doesn't
> allow to show the mail client doesn't it ?
> 
> Do you know a method to set a mail with body and attachment without
> automatic sending ?

No, there is no way to do this. com.sun.star.system.SimpleCommandMail
(Linux) and com.sun.star.system.SimpleSystemMail (Windows) have the bug
you already know, there is no setBody in XSimpleMailMessage.

On the other hand, the css.mail API sends the mail using a SMTP server,
not a mail user agent.

The only "solution" I can imagine is using SystemShellExecute and
execute the command, but you will have to know the name of the program,
and its options. On Linux you could use xdg-email, which has a --body
option (this will work, supposing xdg-email is properly configured).
Though last time I tried to use this service, it was rather broken (it
didn't work with parameters, only the command).


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina