• Re: Aw: Re: Extract lines from file, add to new files

    From Rich Shepard@21:1/5 to Karsten Hilbert on Tue Jan 30 09:53:24 2024
    On Tue, 30 Jan 2024, Karsten Hilbert wrote:

    Why not foxus on just the part you think you are better off using python, namely personalization ?

    Create personalized files and send them with your trusted mailx solution ?

    Karsten,

    Too much time. And while mailx accepts the '-a' option for attachments but
    has none for individual salutations.

    Regards,

    Rich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Karsten Hilbert@21:1/5 to All on Tue Jan 30 18:34:01 2024
    For 30 years I've used a bash script using mailx to send messages to a list of recipients. They have no salutation to personalize each one. Since I want to add that personalized salutation I decided to write a python script to replace the bash script.

    Why not foxus on just the part you think you are better off using python, namely
    personalization ?

    Create personalized files and send them with your trusted mailx solution ?

    That'll take out wrestling with smptlib et al.

    Karsten

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mats Wichmann@21:1/5 to AVI GROSS via Python-list on Tue Jan 30 15:18:20 2024
    On 1/30/24 14:46, AVI GROSS via Python-list wrote:
    Rich,

    You may want to broaden your perspective a bit when people make suggestions.

    Karsten did not spell out a full design and should not need to.

    But consider this as a scenario.

    You want to send (almost) the same message to one or more recipients.

    So call a program, perhaps some variant on a shell script, that does some prep work such as maybe creating a temporary or working directory/folder.
    Had one copy of your message ready in a file somewhere, Have a way to get a list of recipients intended and the file or files containing enough info to link email addresses to human names and anything else such as their
    preferred pronoun or address.

    I'd say based on the bits of the problem description I *have* absorbed,
    which almost certainly isn't all of them, there's a fairly basic
    capability, not terribly often used in my experience, that might be of
    some use:

    https://docs.python.org/3/library/string.html#template-strings

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)