Skip to content

Instantly share code, notes, and snippets.

View goteamtim's full-sized avatar

Tim Harshman goteamtim

  • Miva, Inc.
  • San Diego, CA
View GitHub Profile
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());