Hello,
I have followed a script that allows a user to display details of their computer and submit a new Support Desk Request by pressing a button. This appears to work fine on MacOS Mojave, but for some reason, any version beyond this, displays and error that the file cannot be found.
Code used:
currentUser=$( stat -f "%Su" /dev/console )
sudo -u "$currentUser" /usr/bin/open -b com.microsoft.outlook "mailto:$supportEmail?subject=Support Request -
$currentUser ($computerName - $serialNumber)&body=$displayInfo"
It seems to be an issue with spaces in the displayInfo section, because if I remove the &body=$displayInfo section and add %20 into the spaces of the Subject Line (after making it more simple) it seems to work.
"mailto:$supportEmail?subject=Support%20Request"
Error Received:
The Files /Users/{username}/Desktop/mailto:.... does not exist.
I have tried moving the mailto: to outside the quotes, and convert these to single quotes, still not working.
This is becoming very frustrating, and would love someone in our community to help me out.