Login  
Search All Forums
Dart Home | PowerTCP Mail for ActiveX | Custom Development Reply | PowerTCP Mail for ActiveX Topics | Forums   
AuthorForum: PowerTCP Mail for ActiveX
Topic: Visual Foxpro and Pop/Imap
alliance

From: Ivyland, PA USA
Posts: 1
Member Since: 06/21/06
posted June 21, 2006 5:08 PM

We've just started to evaluate using the Mail Tool to read email, using either POP or IMAP. We downloaded MailTool.exe earlier today.

Using POP, we can login to the server successfully, but the Get method blows up.

Here's the code we're using for that:

loMail = CREATEOBJECT("Dart.Pop.1")
IF loMail.State = 0
 loMail.Login(ipAddress,user,password)
ENDIF
* At this point, loMail.State == 2
loMail.Get(3)

The "Get" line of code then blows up with the following error dialog: "OLE IDispatch exception code 0 from Dart.Pop.1: Miscellaneous error...".

If I try the equivalent code with the IMAP control, I can login just fine and get the list of mailbox names (including "INBOX"). However, the "Count", "Recent", and "Unseen" values are all 0 for all mailboxes.

Note that I can open/view this account through Outlook Express and it shows me that there are 18 unread messages in the Inbox.

We're using Visual Foxpro 8.0, SP1.

Any help/suggestions are appreciated.

Thanks -

Don Krasnick



K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted June 22, 2006 3:36 PM

Hi Don,
Unfortunately, we are not experienced VFP users.

However, I can tell you that
a) You should use the control on a form if at all possible, because licensing fails when CREATEOBJECT is used, and
b) The following very simple code worked for me:

*Get headers and display message count
ThisForm.Pop1.Object.Login("mail", "myAccount", "myPassword")
ThisForm.Pop1.Get(3)
thisForm.Text1.Value = ThisForm.Pop1.Messages.Count
ThisForm.Pop1.Logout


As far as the Count, etc values being 0, you must Refresh the Mailbox before checking these.


Hope it helps,
-ken
olenman
tom@taccomputer.com

From: Aurora, OH USA
Posts: 2
Member Since: 02/03/09
posted February 3, 2009 11:31 PM

Did you ever get POP mail to work with VFP.

My test code :

mailserver = "mail.en.com"
mailuser  = "tac@en.com"
mailpass  = "test"
thisform.pop1.Login(mailserver,mailuser,mailpass)

I get error OLE error 0x80020005 Type Mismatch
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted February 5, 2009 4:28 PM

Hi,
The difference that immediately jumps out is the lack of "Object" in your Login call.

Hope it helps,
-ken

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

olenman
tom@taccomputer.com

From: Aurora, OH USA
Posts: 2
Member Since: 02/03/09
posted February 5, 2009 8:02 PM

I tried it both ways and got the same error.

I even copied and pasted from the example and go the same error.

Thanks
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted February 6, 2009 2:08 PM

Hi,
I just tried this code and it worked fine.
Admittedly, I use an old version of VFP (6).
Maybe this code is not relevant to newer versions?
(We do not have experience with newer versions of VFP).

Aside from that, as always, make sure the dlls are COM registered on your system and that the system is licensed.

-ken

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

Reply | PowerTCP Mail for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX