NO_USER_INTERFACE - not working with Linux

I have the macro codes below and hoping to remove user interaction when sending the email.
Same codes except for the UNO function is used with Windows 7 and it works fine, email is being sent without confirmation. Currently using Fedora and Thunderbird.


Sub SendProdL()

	thisComponent.store()
	
	If MsgBox ("Are you sure you want to send your Productivity Report?", 292, "WARNING") = 6 Then
	
		Dim x as string
		Dim y as string
		
		x = ThisComponent.geturl()
		
		Document = ThisComponent
		Sheets = Document.Sheets
		summarysh = Sheets.getByName("My Summary")
		
		Subj = summarysh.getCellByPosition(2,3).string
		StaffName = summarysh.getCellByPosition(8,5).string
		PDate = summarysh.getCellByPosition(4,7).String
		
		Dim vMailSystem as Object
		Dim vMail as Object
		Dim vMessage
		
		y = inputbox ("Enter Additional Recipients:","Unified Productivity Tracker")
		
		vMailSystem = createUnoService( "com.sun.star.system.SimpleCommandMail" )
		vMail = vMailSystem.querySimpleMailClient()
		vMessage = vMail.createSimpleMailMessage()
		vMessage.setRecipient("unifi**@tpg.com.au")
		If y <> "" Then
			vMessage.ccRecipient = Array(y, ",")
		End If
		
		'vMessage.bccRecipient = Array(y, ",")
		vMessage.setSubject("[AUTO]: DAILY PRODUCTIVITY REPORT - " + StaffName + " - " + PDate)
		
		Dim vAttach(0)
		vAttach(0) = x
		
		vMessage.setAttachement(vAttach())
		
		'DEFAULTS Launch the currently configured system mail client.
		'NO_USER_INTERFACE Do not show the interface, just do it!
		'NO_LOGON_DIALOG No logon dialog but will throw an exception if one
		' is required.
		
		i = com.sun.star.system.SimpleMailClientFlags.NO_USER_INTERFACE
		
		vMail.sendSimpleMailMessage(vMessage, i)
	
	Else
		Exit Sub
	End If

End Sub

I have the same problem with you. As soon as I found the answer, I will let you know.God bless

  • Windows supports SimpleMAPI.
    ExtendedMAPI support is added as part
    of installing Outlook or Exchange.

    OSX doesn’t support MAPI. Entourage uses WebDAV to communicate
    with Microsoft Exchange servers, not
    ExtendedMAPI [5]

    Linux doesn’t support MAPI. Wine supports SimpleMAPI but many of the
    APIs seems to be just stubs. [6]

    OpenChange is a open source emulation of Microsoft Exchange. That
    project has a libmapi library used by
    Evolution, KMail and Mailody (Linux
    email clients) to access Microsoft
    Exchange servers natively. There are
    two old bug reports [7][8] requesting
    Thunderbird use that library. It was
    also requested [9] in the planning
    for Thunderbird 3.0.

Source: MAPI Support

Seems the OpenChange libmapi library might be your best shot at this time…