Search The ForumSearch   RegisterRegister  LoginLogin

MailBee S/MIME

 AfterLogic Forum : MailBee S/MIME
Subject Topic: Accessing Goggle Mail SMTP Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
alip
Newbie
Newbie


Joined: 21 November 2007
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 21 November 2007 at 12:37am | IP Logged Quote alip

Hi,

I encountered with a problem accessing gmail SMTP service. I set up SSL, username, password, etc, but i can't connect with the server!
The log shows that there is some SSL error:
11:12:18 [Connecting to server smtp.gmail.com at port 587 using default domain]
11:12:19 [Initiating SSL Connection]
11:12:19 [Error: SSL Init Failed]
11:12:19 [Error: Connection failure]

GMail POP3 works fine.

Here is the C++ code I use to connect:

smtp.SetAuthMethod(1); // i also tried codes 0, 1, 2, 3
smtp.SetUserName(m_strSMTPName);
smtp.SetPassword(m_strSMTPPassword);
smtp.SetPortNumber(587);
ssl.SetUseStartTLS(TRUE);
smtp.SetRefSsl(ssl);
smtp.Connect(); // return error

What do I do wrong?
Is it possible to connect to gmail via MailBee SMTP?

Best Regards

Andrew
Back to Top View alip's Profile Search for other posts by alip
 
alip
Newbie
Newbie


Joined: 21 November 2007
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 21 November 2007 at 12:52am | IP Logged Quote alip

Update:

SSLSpecificError returns 0x80090308
Back to Top View alip's Profile Search for other posts by alip
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 21 November 2007 at 6:51am | IP Logged Quote Alex

I think this is because you're setting ssl.SetUseStartTLS(TRUE). C++ is a complicated thing where TRUE is not True.
TRUE is 1, while ActiveX's True is VARIANT_TRUE in C++, and it's numeric value is -1.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
alip
Newbie
Newbie


Joined: 21 November 2007
Location: Russian Federation
Online Status: Offline
Posts: 3
Posted: 21 November 2007 at 9:55am | IP Logged Quote alip

Thanks for the reply.

Unfortunately VARIANT_TRUE doesn't work too.
Back to Top View alip's Profile Search for other posts by alip
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 21 November 2007 at 10:17am | IP Logged Quote Alex

Try to upgrade to the latest version of MailBee.dll.

I just checked with MailBee.dll 5.5.0.114 and it works fine for me. Even with TRUE (this is because we added checks which accept both -1 and 1 as TRUE inside the component).

Code:

ISMTP oMailer;
ISSL oSSL;

if (oMailer.CreateDispatch("MailBee.SMTP"))
{
  oMailer.SetLicenseKey("your key here");
  oMailer.SetServerName("smtp.gmail.com");
  oMailer.SetPortNumber(587);
  oMailer.SetLogFilePath("C:\\smtp_log.txt");
  oMailer.SetEnableLogging(-1);

  if (oSSL.CreateDispatch("MailBee.SSL"))
  {
    oSSL.SetLicenseKey("your key here");
    oSSL.SetUseStartTLS(TRUE);
    oMailer.SetRefSsl(oSSL);
  }

  BOOL b1 = oMailer.Connect();
  BOOL b2 = oMailer.Disconnect();
}


Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide