diff --git a/bin/autoreply/autoreply.sh b/bin/autoreply/autoreply.sh index 3dff41f..029721f 100755 --- a/bin/autoreply/autoreply.sh +++ b/bin/autoreply/autoreply.sh @@ -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)" # 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" printf "\n\nOn %s, %s wrote:\n" "$date" "$orig_sender" >> "$temporary_file"