This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fetchInlineImage() { | |
var results = GmailApp.search("Subject: Inline Image Test"); | |
for(var i in results) { | |
var thread = results[i]; | |
messages = thread.getMessages(); | |
for(var j in messages) { | |
var msg = messages[j]; | |
var pattern = /<img.*src="([^"]*)"[^>]*>/; | |
var matches = pattern.exec(msg.getBody()); | |