javascript,google-apps-script,insertion,inline-images
A paragraph contains several child elements e.g. strings of text or images. You need to get the index of the text element inside the paragraph, not the index of the paragraph inside the document. Try this function placeImage(start, end) { var d = DocumentApp.getActiveDocument() var s = d.getBody(); var logoResult...
The Mail gem ist quite well maintained, so it really helps to look into the documentation. Your provided snipped misses an integral part: the definition of pic: pic = attachments['banner.png'] With this information, you can easily find the documentation on attachments, which will yield this bit: You can also search...
html-email,postmark,inline-images
Your API call would basically look like this: { "From": "[email protected]", "To": "[email protected]", "Subject": "Regular API Test", "Tag": "inline", "HtmlBody": "<html><body><strong>hello bacon!</strong<br /><img src=\"cid:myimagecid\"/></body></html>", "TextBody": "Hello", "Attachments": [ { "Name": "bacon.jpg", "Content": "/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAQDAwQDAwQEBAQFBQQFBwsHBwYGBw4KCggLEA4RERA...gDgBAA9GT/APrP/9k=", "ContentType": "image/jpeg", "ContentID":...