[bin] [autoreply] Reinstate the fix for date header of autoreply

This commit is contained in:
Adam Cooper 2024-08-05 12:12:19 -04:00
parent 7e5c97de78
commit bb9916703c

View file

@ -52,7 +52,7 @@ while IFS= read -r -d '' thread ; do
orig_body="$(jq -r '.original.body[0].content[] | select(."content-type" == "text/plain") | .content' $temporary_reply)" orig_body="$(jq -r '.original.body[0].content[] | select(."content-type" == "text/plain") | .content' $temporary_reply)"
# Copy canned message to temporary file # Copy canned message to temporary file
printf "From: %s\nSubject: %s\nTo: %s\nIn-Reply-To: %s\nReferences: %s\n\n" "$sender" "$subject" "$recipient" "$in_reply_to" "$references" >> "$temporary_file" printf "From: %s\nSubject: %s\nTo: %s\nDate: $(date +'%a, %d %b %Y %R %z')\nIn-Reply-To: %s\nReferences: %s\n\n" "$sender" "$subject" "$recipient" "$in_reply_to" "$references" >> "$temporary_file"
cat /home/adam/dotfiles/bin/autoreply/misdirected_email_autoreply.txt >> "$temporary_file" cat /home/adam/dotfiles/bin/autoreply/misdirected_email_autoreply.txt >> "$temporary_file"
printf "\n\nOn %s, %s wrote:\n" "$date" "$orig_sender" >> "$temporary_file" printf "\n\nOn %s, %s wrote:\n" "$date" "$orig_sender" >> "$temporary_file"