06-06-2023 01:30 AM
Hello dear fellows.
I was wondering how I can send an image attachment via SMTP functions in LabVIEW, from my raspberry pi.
This works, but I can't figure in what file path the PNG is supposed to be saved or retrieved from.
The email sends great, but not image in it and I get the error saying that the file path is incorrect or doesn't exist.
Best regards,
Seb
06-06-2023 08:22 AM - edited 06-06-2023 08:28 AM
Your problem is that LabVIEW runs inside the chroot environment, and hence the path you need to use has to be a path inside of the chroot, not the root of your Raspberry Pi OS. The chroot is exactly meant to hide everything from the host OS to the guest OS that is not explicitly mapped to a path inside the chroot.
Something like /tmp/mydata.png would be more useful and that would then be accessible from your host Raspberry Pi OS as /srv/chroot/labivew/tmp/mydata.png, but inside that chroot it is simply /tmp/myData.png and since the LabVIEW runtime runs inside that chroot too, it means that your LabVIEW program needs to use that path too. /srv/chroot/labview has no meaning inside the chroot as it is inaccessible (unless of course you create such a directory inside the chroot too, but that is a different thing and has nothing to do with the directory with the same name as seen from your Raspberry Pi host OS.