Explorar o código

fix for missing html body

Ryan Brunt %!s(int64=5) %!d(string=hai) anos
pai
achega
67aba9e3ae
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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