[Gambas-bugtracker] Bug #2803: Desktop.SendMail method broken on the master

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Tue Dec 5 15:14:31 CET 2023


http://gambaswiki.org/bugtracker/edit?object=BUG.2803&from=L21haW4-

Comment #8 by Claus DIETRICH:

Hi Benoît

I found following crucial differences between the sendmail method implementations of the Stable and the Master version:

Difference 1:
In the stable version the address arrays may be Null.
In the master version the address arrays may not be Null.

So when I changed the demo code from
  Dim toAddress As String[]
  Dim ccAddress As String[]
  Dim bccAddress As String[]

  Desktop.SendMail(toAddress, ccAddress, bccAddress, "", "", Application.path & "/scanner.png)

to

  Dim toAddress As New String[]
  Dim ccAddress As New String[]
  Dim bccAddress As New String[]

  Desktop.SendMail(toAddress, ccAddress, bccAddress, "", "", Application.path & "/scanner.png") 

Thunderbird was opened in the master.

Difference 2:
The data type of the attachment-argument has changed
The stable version requires a string (file address as applied in the demo code).
The master version requires a variant as data type (not an array) although it is called "attachments" (plural).
In various tests the passing of a variant didn't lead to an attachment in Thunderbird.

I further couldn't find a property Desktop.Enabled and don't know how to set the property DesktopPortal.Enabled - there was no according class on my platform. Do I need to load a new component?

With best regards
Claus

Claus DIETRICH changed the state of the bug to: Accepted.




More information about the Bugtracker mailing list