See attached patch.

Not sure about usefulness of this feature judging just from sample you 
provided before. Summary tag suggested it was my e-mail not Joerg's in 
your sample, but he was the first one to be listed in an <email> tag.


-- 
Adrian C. (anrxc) | anrxc..sysphere.org | PGP ID: D20A0618
PGP FP: 02A5 628A D8EE 2A93 996E  929F D5CB 31B7 D20A 0618
--- gmail.lua.bak       2011-03-15 05:05:19.000000000 +0100
+++ gmail.lua   2012-02-14 20:19:04.000000000 +0100
@@ -40,7 +40,8 @@
 local feed = rss.inbox
 local mail = {
     ["{count}"]   = 0,
-    ["{subject}"] = "N/A"
+    ["{subject}"] = "N/A",
+    ["{sender}"]  = "N/A"
 }
 -- }}}
 
@@ -57,7 +58,6 @@
 
         -- Find subject tags
         local title = string.match(line, "<title>(.*)</title>")
-        -- If the subject changed then break out of the loop
         if title ~= nil and not string.find(title, feed[2]) then
             -- Check if we should scroll, or maybe truncate
             if warg then
@@ -70,6 +70,14 @@
 
             -- Spam sanitize the subject and store
             mail["{subject}"] = helpers.escape(title)
+        end
+
+        -- Find sender tags
+        local from = string.match(line, "<email>(.*)</email>")
+        -- If the sender changed then break out of the loop
+        if from ~= nil then
+            -- Spam sanitize the sender and store
+            mail["{sender}"] = helpers.escape(from)
             break
         end
     end

Reply via email to