I can gain access to my Zimbra/Exchange email through a pre-poulated URL, site popmailchecker. In order to gain access, I enter my email address, password and server.
Unfortunately the site does not sequentially order these emails. There is also no total email count. I am seeking to return four fields... SUBJECT, SENDER, SENDER'S EMAIL, and DATE.
Having done my best to develop several non-lua methods, I have hit the brick wall and am now seeking some assistance. Here are the key particulars:
URL SOURCE CODE that i need to parse:
Code: Select all
<body bgcolor="#FFFFFF">
<center><img src="http://www.pepjob.com/mail/popmail.gif" width=598 height=62 usemap="#Map" border="0"><map name="Map"><area shape="rect" coords="343,42,600,64" href="http://www.pepjob.com" alt="PEPJob.com :: Your #1 Online Career Resource" title="PEPJob.com :: Your #1 Online Career Resource" target="_blank"></map></center>
<p><div align="center">
<table bgcolor="#93BEE2" width=300><tr><td align=center><font face="Arial" size=2 color="#FFFFFF"><img src="http://www.pepjob.com/mail/inboxlogo.gif"></font></td></tr></table><p>
<center><font size='2'>Welcome! You are now logged in as <font color='#3B88C9'>paul@wilson.com.</font> on webmail.email.com.</font></center>
<form action=/cgi-bin/mail/mailchek.cgi method=POST>
<input type=HIDDEN name="action" value="killmail">
<center><table border="1" cellpadding="0" width="100%" bgcolor="#EEFFEE">
<tr align=center><td><b><img src="http://www.pepjob.com/mail/deletetable.gif"></b></td><td><b><img src="http://www.pepjob.com/mail/subjecttable.gif"></b></td><td><b><img src="http://www.pepjob.com/mail/fromtable.gif"></b></td> <td><b><img src="http://www.pepjob.com/mail/datetable.gif"></b></td></tr>
<tr><td><input type=CHECKBOX name=M1></td> <td><a href=/cgi-bin/mail/mailchek.cgi?action=showmail&MID=1><font color=red>Holiday Aftertaste with Video Converter </font></a></td> <td>(Xilisoft Newsletter) newsletter@news.xilisoft.com</td> <td>Fri, 13 Jan 2012 02:00:20 PST </td></tr><tr><td><input type=CHECKBOX name=M3></td> <td><a href=/cgi-bin/mail/mailchek.cgi?action=showmail&MID=3><font color=red>Hurry our Winter Sale ends soon - final reductions! </font></a></td> <td>(Expansys.com) marketing@expansys.fn1.co.uk</td> <td>Fri, 13 Jan 2012 11:39:35 +0000 (GMT) </td></tr><tr><td><input type=CHECKBOX name=M2></td> <td><a href=/cgi-bin/mail/mailchek.cgi?action=showmail&MID=2><font color=red>Test </font></a></td> <td>(Franc Steff) franc@steffl.co.uk</td> <td>Fri, 13 Jan 2012 21:59:11 +1100 (EST) </td></tr></table><p>
<table border=0><tr>
<td align=left><input type='image' src='http://www.pepjob.com/mail/deletemarked.gif' alt='Delete Marked E-mails' value="Delete Marked" name=B1></form></td><td width=40> </td>
<td align=right><form method=POST action=/cgi-bin/mail/mailchek.cgi>
<input type=hidden name=action value=killmail>
<input type=hidden name="ALL" value=1>
<input type='image' src='http://www.pepjob.com/mail/deleteall.gif' alt='Delete All E-mails' value="Delete All Messages" name=B1></form></td></tr></table></center></div>
</body><body link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
<p><center><table width="40%" cellpadding=0 cellspacing=0 border=0><tr align=center><td>
<table width="100%" cellpadding=0 cellspacing=3 border=0><tr align=center>
<td><font face="Arial black" size="2" color="#FFFFFF"><A HREF=/cgi-bin/mail/mailchek.cgi?action=inbox><img src="http://www.pepjob.com/mail/inbox.gif" alt="Inbox"></A></font> </td>
<td><font face="Arial black" size="2" color="#FFFFFF"><A HREF=/cgi-bin/mail/mailchek.cgi?action=compose><img src="http://www.pepjob.com/mail/compose.gif" alt="Compose"></A></font> </td>
<td><font face="Arial black" size="2" color="#FFFFFF"><A HREF=/cgi-bin/mail/mailchek.cgi?action=logout><img src="http://www.pepjob.com/mail/logout.gif" alt="Logout"></A></font> </td>
<td><font face="Arial black" size="2" color="#FFFFFF"><A HREF=/cgi-bin/mail/mailchek.cgi?action=help><img src="http://www.pepjob.com/mail/help.gif" alt="Help"></A> </td></tr></table>
</td></tr></table></center>
<p><center><font size=1>POPmailChecker® Copyright© 2001 PEPJob.com®. All rights reserved</font> </center>
I have worked tirelessly on this, not only to achieve the right result, but to learn on the job being a complete newbie to rainmeter. With regards to this skin, I have attempted various methods and codes including:
A. PRE-POULATED URL
(got this via Deviant Art somewhere - apolgies to the author for failing to recall their name)
Url=http://pepjob.com/cgi-bin/mail/mailchek.cgi?action=login&USER=#Username#&PASSWORD=#Password#&POPSERVER=#Server#
B. REGEX CODE TO OBTAIN ONLY THE ID VALUES
GetID=(?(?=.*<.*[BOX].*</tr>).*\bname\b.*\bM([0-9]+?).*</tr>)
C. REGEX CODE TO OBTAIN: ID VALUES, SENDER, SENDER'S EMAIL, SUBJECT, DATE
GetEntry=(?(?=.*<.*[BOX].*</tr>).*\bname\b.*\bM([0-9]+?).*<a\s(.*)><font color=red>(.*)</font>.*<td>.(.*)\)\s(.*)</td>.*<td>(.*)</td>.*</tr>)
D. RETURNING ID MEASURES USING LOOKAHEADMETHOD, SUMMING RESULTS
[TotalEmails]
Measure=Calc
Formula=TRUNC(SQRT((Measure1 + Measure2 + Measure3 + Measure4 + Measure5 + Measure6 + Measure7 + Measure8 + Measure9 + Measure10 + Measure11 + Measure12 + Measure13 + Measure14 + Measure15 + Measure16 + Measure17 + Measure18 + Measure19 + Measure20 + Measure21 + Measure22 + Measure23 + Measure24 + Measure25 + Measure26 + Measure27 + Measure28 + Measure29 + Measure30 + Measure31 + Measure32 + Measure33 + Measure34 + Measure35 + Measure36 + Measure37 + Measure38 + Measure39 + Measure40 + Measure41 + Measure42 + Measure43 + Measure44 + Measure45 + Measure46 + Measure47 + Measure48 + Measure49 + Measure50) * 2))
OBJECTIVES-WISHLIST
1. Format the Date, so that it converts all the Date/Time into my local time.
2. Sequentially lists emails according to the time locally received.
3. Display total emails.
4. Display the list of emails with headings according to Time()-Date(), and display as per the following example; RECEIVED IN THE LAST HOUR, RECEIVED EARLIER TODAY (>TODAY 6:00am AND <LAST HOUR), RECEIVED LAST NIGHT (specifing local times for this sub-list yesterday 22:00 - today 6:00), RECEIVED YESTERDAY (YESTERDAY 0:00 - 22:00pm), RECEIVED IN LAST WEEK (Excluding those listed previous ~ yesterday 0:00) & OTHER (More than a week old). Clearly the development of such categories, will need to intuitively look a the current time, and develop a sequence such emails remain listed as chronologically received, and such that no email is repeated.
5. View a medium length snippet of the message content for those items received in the last hour (say 100 characters).
6. View a short length snippet of the message content for those items received in the last hour (say 50 characters).
7. FILTER EMAILS: Develop code to enter Sender Email Adresses into an external table, and then have options to either (filter them as being omitted, color formatted, included to the exclusion of those senders not specified on the list). Why? I can potentially color code word emails as distinct from personal emails, or just display work, or exclude work. I can always Copy & SaveAs to develop a duplicate .ini skin, and display a separate list of emails elsewhere on my screen, so for example, perhaps my work emails will be listed on the LH endge of my screen in Blue, whilst personal emails could be listed via a separate filtered .ini on the RH edge (and be formatted in a different StringStyle to give a different look.
8. Include a hyperlink, that will open my copy of Windows 7 2010 MS Outlook, and hopefully open the email direct.
9. Sound a .wav alert upon receiving a new email (MailNew.wav).
10. Display an hourly alert for 5 seconds displaying a message like "5 UNREAD EMAILS". This message will display this brief message every hour overriding any program window that the user may have open at that time. The alert will appear to self-close, be non-clickable and be accompanied by a separate .wav sound (say MailAlert.wav). Via a separate, .ini file that will be pre-set as that will controlled with Bangs setting the fontcolor (example 255,0,0,255) via a CALC that measures the computer's current time x:00am/pm - x:00:05am/pm, otherwise this meter will display as transparent and non-clickable (colour 0,0,0,1). As the nominal email list will be affixed/set as 'On Desktop', this 5 second alert will most likely need to be a separate (either linked or independent) .ini that will be set as 'Topmost/non-draggable/click through'.
Beacuse there are so many things potentially happening I suspect that the source code should first be downloaded (refreshed ever 5 minutes), such that once downloaded my PC is saved from performing time intensive operations I'm not forever logging onto an external webmail URL consuing unnecessary resource.
Oh... there may be those out there wondering why the requirement for so many options... well I guess it's because the Chinese staff never seem to check their emails to my infuriation, and I'd like their emails (particualrly work emails) to be in their face and automatically accessible without them doing a thing. Will it work... probably not!
Will await potential comment, advice and suggestions! Thanking all and sundry inadvance.