E.g. if I want to send a bunch of emails along the lines of What does it feel like to X? to ask@qr.ae (Quora allows and even somewhat encourages me to ask highly similar questions there).And then give a dictionary of words that I want to substitute for X?I know that the mailx readme has a small section on how to send mail with scripts, but I'm still a UNIX newbie so I'm not sure how I would be able to configure a script in conjunction with mailx just from that.
How would I automate sending highly similar emails with one word changed?
email
If you mean doing this via shell, then yes this is possible. We may have a different result in mind but the operation is similar to this structure I have written previously to deliver the message via shell.See: http://www.akamay.net/PUBLIC/massmail.tarThe script uses three (3) files.Credential File - The actual configuration file. Put it in /tmpHEAD_FROM=BSDUSER                   # Mail from:HEAD_TO=${FIELD1[$a]}             # Rcpt to:HEAD_REPLY-TO=info@my.email.com     # Reply to :)HEAD_BCC-TO=i@my.email.com          # BCC toHEAD_SUBJECT=NOTICE - Personalize mass mail for ${FIELD3[$a]}HEAD_PRIORITY=High                  # Low / Medium / HighHEAD_IMPORTANCE=3                   # ImportanceHEAD_MIME-VERSION=1.1               # MIME VersionHEAD_CONTENT-TYPE=text/plain        # Plain or HTMLTEAM_CONTACT=info@my.email.com      # Signature @ EOFINTERVAL=2                          # Sleep sec. per sendOwner File - The file containing your FIELD'ed values separated by a :.john:Tuesday:john:john@my.email.comsally:Wednesday:sally:sally@my.email.comlisa:Friday:lisa:lisa@my.email.comThe actual massmail script. The script is simple. What it does is to parse the configuration file using a for loop with the value of the given fields: field1,2,3 etc. What I did is to substitute this values from the CSV file, store it in an executable text with the correct format and pipe everything to sendmail.F1=`cat $2 | cut -d: -f1 | perl -ne 'chomp;print $_' | sed 's/^[ \t]*//;s/[ \t]*$//'`F2=`cat $2 | cut -d: -f2 | perl -ne 'chomp;print $_' | sed 's/^[ \t]*//;s/[ \t]*$//'`F3=`cat $2 | cut -d: -f3 | perl -ne 'chomp;print $_' | sed 's/^[ \t]*//;s/[ \t]*$//'`F4=`cat $2 | cut -d: -f4 | perl -ne 'chomp;print $_' | sed 's/^[ \t]*//;s/[ \t]*$//'`F5=`cat $2 | cut -d: -f5 | perl -ne 'chomp;print $_' | sed 's/^[ \t]*//;s/[ \t]*$//'`echo -e #!/bin/bash > $TMP/notify_exececho -e FIELD1=($F1)\nFIELD2=($F2)\nFIELD3=($F3)\nFIELD4=($F4)\nFIELD5=($F5)\n >> $TMP/notify_exececho -e for ((a=0;a<\${#FIELD1[*]};a++))\ndo >> $TMP/notify_exececho -e echo \From:$C_F >> $TMP/notify_exececho -e To:$C_T\nReply-to:$C_RT\nBcc-to:$C_BT\nSubject:$C_S\nPriority:$C_P >> $TMP/notify_exececho -e X-Mail-Priority:$C_I\nMime-Version:$C_M\nContent-Type:$C_C\n$C_MSG\n\n\n >> $TMP/notify_exececho -e Generated using: $0 - Got questions? E-Mail us at: $C_TM >> $TMP/notify_exececho -e \ | /bin/sendmail -t -oi >> $TMP/notify_exececho -e sleep $C_SL >> $TMP/notify_exececho -e done\nexit 0 >> $TMP/notify_execchmod +x $TMP/notify_execI ran into some issues with using mailx regarding the custom reply so I switched with sendmail  to deliver the message and it works fine.