I'm trying to send some email out of OOo and have seen a lot of tips about this on the internet:
- There are the tipps by Andrew Pitonyak, who gives the hint about using "mailto" with SystemShellExecute. This works fine, until I try to use an attachment. After I tried tons of possibilities, I came to the conclusion that this may not even work, because it would be a security infringement if I could place a link with such syntax that send s email with a local file.
- OK, then the other possibility: "SimpleCommandMail". Because I'm on MacOS I have to use this one (and not "SimpleSystemMail"). Unfortunately all I ever could do was to bring up the Mail program of Mac OS without initiating a new mail
Code: Select all
oMailer = createUnoService( "com.sun.star.system.SimpleCommandMail" )
MailProgramm = oMailer.querySimpleMailClient()
NeueNachricht = MailProgramm.createSimpleMailMessage()
NeueNachricht.setRecipient(sRecipient)
NeueNachricht.setSubject( sSubject )
If Len(sRepVor)>0 Then
attachs(0)= sRepVor
NeueNachricht.setAttachement(attachs())
End if
Mailprogramm.sendSimpleMailMessage(NeueNachricht, 0 )
Could it be that this has something to do with the Mac OS implementation?
Any other tips?
Regards,
Benny