Copy link to clipboard
Copied
Hello!
I am using the Lightroom SDK (version LrC_11.0_202110120910-0bccc70d.release SDK) and I would like to send emails.
I can't find anything in the documentation and on the internet I understood that I had to use LuaSocket (https://w3.impa.br/~diego/software/luasocket/installation.html).
Do you have more information on this please?
Thank you !
Copy link to clipboard
Copied
As you've surmised, the SDK doesn't provide any facilities for directly sending email. I think the most practical option is to invoke an operating-system specific command-line utility to send the email. (I haven't researched the possibilities and don't have any specific recommendations.)
I'm not sure, but perhaps the suggestion to use LuaSocket was about using it to connect to a mail server with the SMTP protocol (which you would have to implement). That sounds fairly complicated to me, given all the complications of configuring secure connections and authenticating them to mail servers.
Further, you can't use LuaSocket in LR -- it doesn't allow plugins to load dynamic libraries. There is the LrSocket module, but it's weirdly defined, only allowing one-way connections. SMTP requires bidirectional communication.
Copy link to clipboard
Copied
Or you could use a standalone app or script with data sent from Lightroom using LrShell. If you're using MacOS I have a bash script that uses Applescript and the Mail app to send mail that you could pull apart. Let me know. If you're on windows there's sure to be something similar.
Copy link to clipboard
Copied
Hello!
Okay. I finally used the MailSend command line utility: https://github.com/muquit/mailsend-go which I call with LrTasks.execute () I manage to send from my Gmail or OVH account, it's perfect!
Thank you
Copy link to clipboard
Copied
Awesome.