소스 검색

fix for missing html body

Ryan Brunt 5 년 전
부모
커밋
67aba9e3ae
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      tmpmail

+ 3 - 0
tmpmail

@@ -194,6 +194,9 @@ view_email() {
     FROM=$(jq -r ".from" <<<"$DATA")
     SUBJECT=$(jq -r ".subject" <<<"$DATA")
     HTML_BODY=$(jq -r ".htmlBody" <<<"$DATA")
+    if [ -z "$HTML_BODY"]; then
+         HTML_BODY=$(jq -r ".textBody" <<<"$DATA")
+     fi
 
     # Create the HTML with all the information that is relevant and then
     # assigning that HTML to the variable HTML_MAIL. This is the best method