How to send email with SDK ?

Community Beginner ,
Jan 08, 2022 Jan 08, 2022

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 !

TOPICS
SDK

Views

50

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 08, 2022 Jan 08, 2022

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.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 09, 2022 Jan 09, 2022

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.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 09, 2022 Jan 09, 2022

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 09, 2022 Jan 09, 2022

Copy link to clipboard

Copied

LATEST

Awesome. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines