| 
9597 | 9597 | 
 
  | 
9598 | 9598 |     mailItem.body.getAsync(Office.CoercionType.Html, (bodyResult) => {  | 
9599 | 9599 |       if (bodyResult.status === Office.AsyncResultStatus.Succeeded) {  | 
9600 |  | -        // Insert the Base64 image to the beginning of the body.  | 
 | 9600 | +        // Insert the Base64-encoded image to the beginning of the body.  | 
9601 | 9601 |         const options = { isInline: true, asyncContext: bodyResult.value };  | 
9602 | 9602 |         mailItem.addFileAttachmentFromBase64Async(base64String, "sample.png", options, (attachResult) => {  | 
9603 | 9603 |           if (attachResult.status === Office.AsyncResultStatus.Succeeded) {  | 
 | 
9606 | 9606 | 
 
  | 
9607 | 9607 |             mailItem.body.setAsync(body, { coercionType: Office.CoercionType.Html }, (setResult) => {  | 
9608 | 9608 |               if (setResult.status === Office.AsyncResultStatus.Succeeded) {  | 
9609 |  | -                console.log("Inline Base64 image added to the body.");  | 
 | 9609 | +                console.log("Inline Base64-encoded image added to the body.");  | 
9610 | 9610 |               } else {  | 
9611 | 9611 |                 console.log(setResult.error.message);  | 
9612 | 9612 |               }  | 
 | 
9665 | 9665 | 
 
  | 
9666 | 9666 |     mailItem.body.getAsync(Office.CoercionType.Html, (bodyResult) => {  | 
9667 | 9667 |       if (bodyResult.status === Office.AsyncResultStatus.Succeeded) {  | 
9668 |  | -        // Insert the Base64 image to the beginning of the body.  | 
 | 9668 | +        // Insert the Base64-encoded image to the beginning of the body.  | 
9669 | 9669 |         const options = { isInline: true, asyncContext: bodyResult.value };  | 
9670 | 9670 |         mailItem.addFileAttachmentFromBase64Async(base64String, "sample.png", options, (attachResult) => {  | 
9671 | 9671 |           if (attachResult.status === Office.AsyncResultStatus.Succeeded) {  | 
 | 
9674 | 9674 | 
 
  | 
9675 | 9675 |             mailItem.body.setAsync(body, { coercionType: Office.CoercionType.Html }, (setResult) => {  | 
9676 | 9676 |               if (setResult.status === Office.AsyncResultStatus.Succeeded) {  | 
9677 |  | -                console.log("Inline Base64 image added to the body.");  | 
 | 9677 | +                console.log("Inline Base64-encoded image added to the body.");  | 
9678 | 9678 |               } else {  | 
9679 | 9679 |                 console.log(setResult.error.message);  | 
9680 | 9680 |               }  | 
 | 
9784 | 9784 | 
 
  | 
9785 | 9785 |     mailItem.body.getAsync(Office.CoercionType.Html, (bodyResult) => {  | 
9786 | 9786 |       if (bodyResult.status === Office.AsyncResultStatus.Succeeded) {  | 
9787 |  | -        // Insert the Base64 image to the beginning of the body.  | 
 | 9787 | +        // Insert the Base64-encoded image to the beginning of the body.  | 
9788 | 9788 |         const options = { isInline: true, asyncContext: bodyResult.value };  | 
9789 | 9789 |         mailItem.addFileAttachmentFromBase64Async(base64String, "sample.png", options, (attachResult) => {  | 
9790 | 9790 |           if (attachResult.status === Office.AsyncResultStatus.Succeeded) {  | 
 | 
9793 | 9793 | 
 
  | 
9794 | 9794 |             mailItem.body.setAsync(body, { coercionType: Office.CoercionType.Html }, (setResult) => {  | 
9795 | 9795 |               if (setResult.status === Office.AsyncResultStatus.Succeeded) {  | 
9796 |  | -                console.log("Inline Base64 image added to the body.");  | 
 | 9796 | +                console.log("Inline Base64-encoded image added to the body.");  | 
9797 | 9797 |               } else {  | 
9798 | 9798 |                 console.log(setResult.error.message);  | 
9799 | 9799 |               }  | 
 | 
0 commit comments