Apache OpenOffice (AOO) Bugzilla – Issue 62708
sendSimpleMailMessage fails under Win98
Last modified: 2013-02-24 21:09:12 UTC
The sendSimpleMailMessage works on WinXP, NT, 2000, but not on Win98 SE. Result : com.sun.star.uno.Exception, message : send email failed My code sample (OpenOffice Basic): oServiceMail=createUnoService("com.sun.star.system.SimpleSystemMail") oMail=oServiceMail.querySimpleMailClient() oMessage=oMail.createsimplemailmessage() oMail.sendSimpleMailMessage(oMessage, com.sun.star.system.SimpleMailClientFlags.DEFAULTS)
To add some comments on this bug : what Alain is trying to do is to access this service "SimpleSystemMail" in order to send mails through StarBasic. On Windows 98, when using the dialog is to send a mail ("file > send > Send document as email"), things do seem to work. But when using this service "SimpleSystemMail" to do it, the problem reported above appears. On the source code, we found that OOo seems to send mails using this service in the following file : ./sfx2/source/dialog/mailmodel.cxx [...] Reference< XSimpleMailClientSupplier > xSimpleMailClientSupplier; // Prefer the SimpleSystemMail service if available xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >( xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleSystemMail" ))), UNO_QUERY ); if ( ! xSimpleMailClientSupplier.is() ) { xSimpleMailClientSupplier = Reference< XSimpleMailClientSupplier >( xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SimpleCommandMail" ))), UNO_QUERY ); } if ( xSimpleMailClientSupplier.is() ) { Reference< XSimpleMailClient > xSimpleMailClient = xSimpleMailClientSupplier->querySimpleMailClient(); if ( !xSimpleMailClient.is() ) { // no mail client support => message box! return SEND_MAIL_ERROR; } [...] So, it seems to us that the code stops there on the "return SEND_MAIL_ERROR;" line. Note : - from "SimpleSystemMail.idl" /** Specifies a SimpleSystemMail service. Implementations of such a service implement an interface to send mail messages via the currently configured system mail client. */ - from "SimpleCommandMail.idl" /** Specifies a SimpleCommandMail service. Implementations of such a service, do implement an interface to send mail messages via the current configured command line mail application. */
sw->tra: not sure if this is still your area ... but as described "File-Send-Document as Email" work under Win98 ... the macro doesn't with the described error message. All works fine on the other Windows derivates >98
Hennes, please take over.
Duplicate *** This issue has been marked as a duplicate of 68596 ***
Closed
Created attachment 73099