Comcast email dataURL no longer good
It appears that the dataURL for Comcast webmail (http://xfinityconnect.mail.comcast.net/) is no longer good so the script cannot find read/unread information when it checks.
I can't seem to find another page with similar info. Can anyone else?
Dan
Offsprung
Tue, 05/13/2014 - 05:39
Permalink
Ditto
Was going to request new comcast also. Sort or search on the script page might be REQUIRED?
Tr3b
Tue, 05/13/2014 - 05:50
Permalink
Admin...Test Account has been
Admin...Test Account has been enabed for you. I have sent you an e-mail with info.
dankirkd
Tue, 05/13/2014 - 07:19
Permalink
No email received
Was that to me or to Offsprung?
RpD
Tue, 05/13/2014 - 07:35
Permalink
admin
Tr3b's post is to the X-Notifier author/admin, Tobwithu.
Tr3b
Fri, 05/16/2014 - 07:26
Permalink
New Script
Comcast accounts now working with new script
dankirkd
Sat, 05/17/2014 - 02:43
Permalink
Appears to work
Thanks. This appears to work, although the dataURL and viewURL locations redirect to http://web.mail.comcast.net/zimbra/mail?app=mail#1 so it seems that they should be updated too.
My additional use case is to only count unread emails from a given sender. I've added extra logic to do this, but it isn't obvious what JSON is being used to identify the unread emails at an email level. This is what I use:
function getCount(aData){
var fnd=aData.match(/"name":"Inbox".+?(?:"u":(\d+))?,"view"/);
var unreadCount = fnd?(fnd[1]?fnd[1]:0):-1;
// Can't read page would yield -1:
if (unreadCount == -1)
return -1;
else {
var pattern = /"f":"(.+)".*?"a":"(.+)"/g;
var match;
var count = 0;
// The while loop will yield all match pairs:
while (match = pattern.exec(aData)) {
// If the array pos 1 match is 'u' we count that:
if (match[1] == "u" && match[2] == "sender@email.address")
count++;
}
return count;
}
}
As you can see I'm looking for "f":"u" followed by the specific sender email. But my logging is inconclusive that this is in fact how they are identified.
Dan
dankirkd
Tue, 05/20/2014 - 02:23
Permalink
adjustment
Actually, that logic for the match should be:
if (match[1].indexOf("u") > -1 && match[2] == "sender@email.address") ...
because sometimes "u" isn't the only letter used in the JSON (I've also seen "f":"au" on unread emails).
I'm still testing this.
dankirkd
Wed, 05/21/2014 - 00:30
Permalink
Confirmed
The new script works. My embellishment to count just unread emails from a given sender are as follows:
this.dataURL="http://web.mail.comcast.net/zimbra/mail?app=mail#1";
this.viewURL="http://web.mail.comcast.net/zimbra/mail?app=mail#1";
function getCount(aData){
var fnd=aData.match(/"name":"Inbox".+?(?:"u":(\d+))?,"view"/);
var unreadCount = fnd?(fnd[1]?fnd[1]:0):-1;
// Can't read page would yield -1:
if (unreadCount == -1)
return -1;
else {
var pattern = /"f":"(.+?)".*?"a":"(.+?)"/g;
var match;
var count = 0;
// The while loop will yield all match pairs:
while (match = pattern.exec(aData)) {
// If the array pos 1 match contains 'u' we count that:
if (match[1].indexOf("u") > -1 && match[2] == "sender@email.address")
count++;
}
return count;
}
}
Thanks.