diff --git a/Scripts/Billing/email-template-new.sh b/Scripts/Billing/email-template-new.sh index 0c47d6c..8342280 100755 --- a/Scripts/Billing/email-template-new.sh +++ b/Scripts/Billing/email-template-new.sh @@ -10,15 +10,14 @@ DATE=`date -R` ORDER_ID="$6" CURRENCY="AUD" # TODO: Need to check it +MAIL_PART_SEPERATOR_1="=="`date +%y%m%d%S`"===" +MAIL_PART_SEPERATOR_2="==="`date +%S%d%m%y`"==" -cat - "$6" << EOF | mailx -b "jryland@xiaofrog.com" -a "From: $BILLING_EMAIL" -s "Order Processed" "$CUSTOMER_NAME <$CUSTOMER_EMAIL>" - -Content-Type: multipart/alternative; - boundary="------------080305050909090201040706" +cat - "$6" << EOF | mailx -b "jryland@xiaofrog.com" -a "From: $BILLING_EMAIL" -a "Content-Type: multipart/alternative;\n boundary=\"$MAIL_PART_SEPERATOR_1\"" -s "Order Processed" "$CUSTOMER_NAME <$CUSTOMER_EMAIL>" This is a multi-part message in MIME format. ---------------080305050909090201040706 +--$MAIL_PART_SEPERATOR_1 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit @@ -69,12 +68,12 @@ ---------------080305050909090201040706 +--$MAIL_PART_SEPERATOR_1 Content-Type: multipart/related; - boundary="------------070801030203030007010503" + boundary="$MAIL_PART_SEPERATOR_2" ---------------070801030203030007010503 +--$MAIL_PART_SEPERATOR_2 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit @@ -167,7 +166,7 @@ ---------------070801030203030007010503 +--$MAIL_PART_SEPERATOR_2 Content-Type: image/jpeg Content-Transfer-Encoding: base64 Content-ID: @@ -234,8 +233,8 @@ utfBFizuUhS6cgN9h5rvRaeVSJhYIBkE6BE6JW2KZfxQBFz8AtihhICgbB/u9WIScC0WoSEg 7E5P3zUK2hgEwzBi88AO4TON9qR2FNsVFfLj/dCo4SAwWWi7hcVeyjdRkQEzR6m2rXh9Y9D5 TJmLnd6BW9QobFte50e1z5GhDkilRjp7RECc8HOtO8SXunxQYDmnxA/l/9k= ---------------070801030203030007010503-- +--$MAIL_PART_SEPERATOR_2-- ---------------080305050909090201040706-- +--$MAIL_PART_SEPERATOR_1-- EOF