How to read file content and send email on Debian Bullseye

2QdxY4RzWzUUiLuE at potatochowder.com 2QdxY4RzWzUUiLuE at potatochowder.com
Sat Feb 4 22:13:38 EST 2023


On 2023-02-04 at 17:59:11 -0500,
Thomas Passin <list1 at tompassin.net> wrote:

> On 2/4/2023 10:05 AM, ^Bart wrote:
> > Hi guys,
> > 
> > On a Debian Bullseye server I have a lftp upload and after it I should
> > send an email.

[...]

> [...] you could run a shell script that sends the file with lftp, and
> depending on the return code uses xdg-email to send one of the two
> messages. This would probably be simpler than using Python.

xdg-email appears to be for interactive use (it opens the user's
"preferred email composer"); I think sendmail would work much better
from a script.

Otherwise, I had the same initial thought, to add to and/or build a
wrapper around the existing lftp script.


More information about the Python-list mailing list