Login  
Search All Forums
Dart Home | PowerTCP Mail for .NET | Custom Development Reply | PowerTCP Mail for .NET Topics | Forums   
AuthorForum: PowerTCP Mail for .NET
Topic: How do you set up Imap Gmail
codeboy

From: Detroit, MI USA
Posts: 2
Member Since: 03/09/10
posted March 9, 2010 5:38 PM

Has anyone had any experience with setting up Imap to check and view email on Google?

LabelResult.Text = imap1.Login("imap.gmail.com", "fakeemail@gmail.com", "secretpassword").Code.ToString();
imap1.Security = Dart.PowerTCP.Mail.Security.Explicit;

I keep getting the error message: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 74.125.95.109:143

Jason Farrar (Admin)

From: Oneida, NY USA
Posts: 223
Member Since: 07/24/07

Extra Support Options
Custom Application Development

posted March 10, 2010 1:33 PM

Please review Google's instructions for using an Imap client with Gmail: http://mail.google.com/support/bin/answer.py?answer=77659

They use some non-standard ports and require SSL, you need to configure the control to use the ports and SSL as well.

-Jason
codeboy

From: Detroit, MI USA
Posts: 2
Member Since: 03/09/10
posted March 11, 2010 3:13 PM

How would you set the ports and what do you want for the client field?

imap1.Login("imap.gmail.com", 993, "client", 80, "fakeemail@gmail.com", "secretpassword")

What about the security setting, which one is correct?
imap1.Security = Dart.PowerTCP.Mail.Security.Explicit;
OR
.ExplicitOptional;
OR
.Implicit;
OR
None;

I also noticed that you mention a control. I have the dll in my bin directory. But it's nowhere in my toolbox as a control in spite of following instructions to do so. I'm using VS2008.
Jason Farrar (Admin)

From: Oneida, NY USA
Posts: 223
Member Since: 07/24/07

Extra Support Options
Custom Application Development

posted March 15, 2010 9:58 AM

This works for me:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dart.PowerTCP.Mail;

namespace GMailSmtp
{
  class Program
  {
    static void Main(string[] args)
    {
      Imap myMap = new Imap();
      myMap.Security = Security.Implicit;
      myMap.Login("imap.gmail.com", 993, "", 0, "emailaddress@gmail.com", "password");
       foreach (Mailbox MB in myMap.Mailboxes)
      {
        Console.WriteLine(MB.Name);
      }
      Console.ReadLine();
    }

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