So, just a little reminder, because tra didn't react:

Perhaps Jürgen as the project lead can answer Stephans question, if the documented service com.sun.star.mail.MailMessage is available in any OpenOffice.org installation, if not, what's the reason?

Regards

Peter

Peter Eberlein schrieb:
Tino, any comments are appreciated.

Regards

Peter

Stephan Bergmann schrieb:
Peter Eberlein wrote:
Hi Stephan,

Stephan Bergmann schrieb:


Assuming your code is in Java, then

  XMailMessage xMailMessage = com.sun.star.mail.MailMessage.create(
    xComponentContext, "[EMAIL PROTECTED]", "[EMAIL PROTECTED]",
    "Subject", new TextTransferable("Body"));

would be the right way to do it. (However, I have no idea why xMailMessage is null for you.)


I got a com.sun.star.uno.DeploymentException: component context fails to supply service com.sun.star.mail.MailMessage of type com.sun.star.mail.XMailMessage
    at com.sun.star.mail.MailMessage.$castInstance(Unknown Source)

The Office is starting in listening mode, so I get the xComponentContext from the propertyValue("DefaultContext").

I see. The create code internally pretty much does the same you did, too, but then also checks to see that the returned object is non-null, throwing a DeploymentException otherwise. So, that explains the difference. However, why there is no such service available in your installation, I do not know (maybe that service is not available in any OOo installation?). The corresponding idl file was first checked in by tra, so maybe he knows more...

-Stephan



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to