浏览代码

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