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

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Tue Oct 31 19:57:18 CET 2023


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

Comment #2 by Claus DIETRICH:

Hi
What is the reason that you now want to pass the email through DBus? How was it done before? Do you have an explanation why the Desktop.SendMail method works on the stable but not on the master? What has changed between the two version?  

This is my current workaround including my code-comments. It luckily also works with other default email-clients than TB - at least with a number of distros (tested on Mint/Ubuntu,OpenSuse and Debian):

  'Start standard email-client and hand over scanned documents as PDF attachment
  'Desktop.SendMail(toAddress, ccAddress, bccAddress, "", "", Desktop.RuntimeDir & "/Scan_" & sTimeStamp & ".pdf") 'Started with empty address arrays"

  'This also starts the standard email client and was chosen instead of above Desktop.Sendmail
  'In case of thunderbird it turned out that the following commmand works more reliably on different distros
  If Exist("/usr/bin/thunderbird") Then 
    Shell "thunderbird -compose attachment=" & Desktop.RuntimeDir & "/Scan_" & sTimeStamp & ".pdf"
  Else 
    Shell "xdg-email --attach " & Desktop.RuntimeDir & "/Scan_" & sTimeStamp & ".pdf"
  Endif

Best regards
Claus




More information about the Bugtracker mailing list