diff --git a/lib/parser.js b/lib/parser.js index 52d4592..79606c2 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -113,7 +113,7 @@ var REGEXES = { recipient : [ /the following addresses had permanent fatal errors (?:.*?)\s\<(.+?)\>/i, - /there was a temporary problem delivering your message to (.+?). Gmail will retry/i, + /there was a temporary problem (?:while )?delivering your message to (.+?). Gmail will retry/i, /the following message to \<(.+?)\> was undeliverable/i, /to the following addresses:\s*(.+)/i, /^your message wasn't delivered to (.+?)\s/mi, // "Your message wasn't delivered to john@acme.com" @@ -555,6 +555,7 @@ class Parser { _str = _str.replace(this.__regexes.line_break_double_indent_single, "\n\n"); // Replace single Line-break with regular space + // TODO: re2 doesn't support lookbehinds, so for now we use a pure-JS regex _str = _str.replace(/(?", "main": "lib/index.js",