Gmail in DesktopX
Incoming Email Notification
Monday, December 8, 2008 by DrSharl | Discussion: DesktopX Tutorials
Hi, I have an object for the email that is interactive, when no mail is normal and when mail is animated...
My problem is that i can't configure for my gmail account. In configure Incoming Email Notification, I write the server, login and password, configure in pop3 and check each 1 minute, but not work. I have my Gmail account configure for pop3.
My question is: How I configure for that works? Any Script?
Thank you very much.
Reply #2 Tuesday, December 9, 2008 4:22 PM
Ok, thanks, but... Can you help any more? i have a little noob in Scripts and i don't know how to work this.
Reply #3 Tuesday, December 9, 2008 5:53 PM
Hmmmm.... This is not good. You need learn DesktopX and VBScript (or at least Java) if you really want make your own widgets... ![]()
Ok. Please look below:
1. Cteate any Text Object. Then add this lines into your code:
Sub Object_OnScriptEnter
If system.InternetConnected Then
un = "YOUR GMAIL USERNAME" '<== enter here...
ps = "YOUR GMAIIL PASSWORD" '<== enter here...
desktopx.object("YOUR OBJECT").text = CheckGmail(un,ps)
End If
End Sub
Function CheckGmail(un,ps) '<== This Function will calculate your incoming mails
On Error Resume Next
im = 0 : maildata = "" : mailarray = ""
If instr(un,"@") > 0 Then
gmailname = split(un,"@")
ac = gmailname(0)&":"&ps
ms = "gmail.google.com"
End If
Set objXML = CreateObject("Microsoft.XMLHTTP")
objXML.Open "GET", "https://"&ac&"@"&ms&"/gmail/feed/atom/atom.xml", False
objXML.send "Authentication"
objXML.Open "GET", "https://"&ms&"/gmail/feed/atom", False
objXML.send "Gmail Information"
maildata = objXML.responseText
desktopx.ScriptObject("xbox").control.additem maildata
Set objXML = nothing
If instr(maildata,"<entry>") > 0 Then
mailarray = split(maildata,"<entry>")
For i = 0 To UBound(mailarray)
If instr(mailarray(i),"</entry>") > 0 Then
im = im + 1
End If
Next
Set mailarray = nothing
End If
CheckGmail = im
End Function
2. Run a Script And you'll Get a result.
Best Regards.
Reply #4 Thursday, December 11, 2008 3:45 AM
hey Vad! I tried this script and it doesn't work . It allways return a zero for me. where did I a mistake? (I triedd withe user name and user adress [email protected] and paste the script ) ![]()
Reply #5 Thursday, December 11, 2008 12:28 PM
SORRY! SORRY! SORRY!
It was my mistake! I forgot to add one little line into the function: ms = "gmail.google.com"... Now the bug is fixed, code is tested ant already work. Please copy and paste the updated Script from my post 3#.
Best Regards.
Reply #6 Thursday, December 11, 2008 1:14 PM
Thanks Vad
It work perfectly now. and congratulations one more time for you deserved promotion
Reply #7 Thursday, July 30, 2009 6:45 AM
Does this script still work? I am making a theme and I am trying to make a gmail notifier. With this script do I need to use the incomming email notification or the incoming email notification controlled by a script? I also just tried creating a text item. It still returns 0. Can some help me out with this one?
Reply #8 Saturday, April 2, 2011 1:35 PM
Sorry I updating this threat because it seems that code in not working anymore. Always show the number 20 and that's it.
Reply #9 Saturday, April 2, 2011 10:44 PM
I have some themes for sale but many customers says the same. These Mailcheckers doesn't work with Gmail. We are very dissapointed. Doesn't we?
Reply #10 Sunday, April 3, 2011 12:16 AM
I never had a mail checker that worked with any email....ever. Even the one in Winstep tells me an inaccurate number of emails.
Reply #11 Sunday, April 3, 2011 12:34 AM
No disrespect, but perhaps you don't fully understand how email checkers work then. From the Winstep Xtreme FAQ:
The Email Checker is not a full blown email client. The Email Checker simply asks the server how many messages are pending retrieval, and, if there are any, that's what it reports. It also keeps a counter of the number of messages in the server so it will only notify you again when more mail arrives. The notification, however, will tell you the total number of messages still in the server, not the number of messages that arrived between the new and previous notifications.
This counter is reset when the number of messages in the server is less than the value in the counter (which means mail has been retrieved in the mean time) or when you tell the Checker to launch the email client.
The Email Checker has no way of knowing which messages have already been read but left on the server.
Also, the Winstep Email Checker was one of the very few (and possibly the very first) that was able to work with Gmail accounts, but that ended when SSL v2 was found to be insecure in 2009 and the email providers stopped allowing connections encrypted with it. Unlike most normal POP3 email servers, Gmail, Hotmail and Yahoo mail all require a SSL encrypted connection, which the Winstep Email Checker provided - but only version 2. SSL v3 support is a whole different beast to implement.
The Winstep Email Checker is probably still the only Email Checker that offers support for IMAP accounts.
Reply #12 Sunday, April 3, 2011 12:48 AM
Quoting RedneckDude,
reply 10
I never had a mail checker that worked with any email....ever. Even the one in Winstep tells me an inaccurate number of emails.
No disrespect, but perhaps you don't fully understand how email checkers work then. From the Winstep Xtreme FAQ:
The Email Checker is not a full blown email client. The Email Checker simply asks the server how many messages are pending retrieval, and, if there are any, that's what it reports. It also keeps a counter of the number of messages in the server so it will only notify you again when more mail arrives. The notification, however, will tell you the total number of messages still in the server, not the number of messages that arrived between the new and previous notifications.
This counter is reset when the number of messages in the server is less than the value in the counter (which means mail has been retrieved in the mean time) or when you tell the Checker to launch the email client.
The Email Checker has no way of knowing which messages have already been read but left on the server.
Also, the Winstep Email Checker was one of the very few (and possibly the very first) that was able to work with Gmail accounts, but that ended when SSL v2 was found to be insecure in 2009 and the email providers stopped allowing connections encrypted with it. Unlike most normal POP3 email servers, Gmail, Hotmail and Yahoo mail all require a SSL encrypted connection, which the Winstep Email Checker provided - but only version 2. SSL v3 support is a whole different beast to implement.
The Winstep Email Checker is probably still the only Email Checker that offers support for IMAP accounts.
Ah, I sit corrected....thanks Jorge!
Reply #13 Sunday, April 3, 2011 12:54 AM
Here is the object that I want to fix. If someone have any idea how can the text object show the new emails and at the same time to show the state "New mail". The original object only works with proprietary domains but many users (included me) need that it works with Gmail.
Is this possible??? Thanks in advance.
Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!







Reply #1 Monday, December 8, 2008 5:58 PM
This is because Gmail requires User Authentication. Uou may download a widget: https://www.wincustomize.com/skins.aspx?skinid=873&libid=34 Then open it in the DesktopX Builder and look how it scripted.
Here you'll find a little subroutine that make all that you want:
Sub CheckGmail_Ex(cn,un,ps,ms)
On Error Resume Next
im = 0 : maildata = "" : mailarray = ""
If instr(un,"@") > 0 Then
gmailname = split(un,"@")
ac = gmailname(0)&":"&ps
End If
Set objXML = CreateObject("Microsoft.XMLHTTP")
objXML.Open "GET", "https://"&ac&"@"&ms&"/gmail/feed/atom/atom.xml", False
objXML.send "Authentication"
objXML.Open "GET", "https://"&ms&"/gmail/feed/atom", False
objXML.send "Gmail Information"
maildata = objXML.responseText
Set objXML = nothing
If instr(maildata,"<entry>") > 0 Then
mailarray = split(maildata,"<entry>")
For i=0 To UBound(mailarray)
If instr(mailarray(i),"</entry>") > 0 Then
im = im + 1
End If
Next
Set mailarray = nothing
End If
If im = 1 Then
strmail = "mail"
Else
strmail = "mails"
End If
desktopx.object("mails"&cn).text = im
desktopx.object("mailstxt"&cn).text = strmail
allmails = allmails + im
End Sub
Best Regards.