[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Inserting a field in a LibreOffice email subject line for a bulk mailing.



On 21/12/14 10:59 AM, Lisi Reisz wrote:
Does one of the LO fans know how to insert a field in a LibreOffice email
subject line for a bulk mailing?

Lisi


LibreOffice has its own e-mail discussion list.

I've never needed to do it because I've used a simple work-around bash script. I use LibreOffice to produce a customized attachment (usually a certificate for someone) then use an exported text file and the read command to allow me to extract the custom information I need.

I can use this to build custom subject and body parts, plus add the appropriate attachment, using a command-line mail program.

Here's a quick and dirty example of how to do it:

#! /bin/bash
cat $1.text | while read addr first last; do
  echo "sending e-mail to" $first $last "at" $addr
  echo "Dear" $first $last > salutation.text
  cat $2.text >>salutation.text
  if [[ "$4" == "" ]]; then
    mutt $addr -s "$3" <salutation.text
  else
    mutt $addr -s "$3" -a $4.pdf <salutation.text
  fi
done




Reply to: