32 bit SSL SMTP

Windows specific forum
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: 32 bit SSL SMTP

Post by RichAlgeni »

One minor issue I had with CryptLib was that it handled the network functions. I would rather allocate memory, call an encryptor process, then send the SSL data myself.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: 32 bit SSL SMTP

Post by IdeasVacuum »

GnuTLS also looks good - and it is using UTF-8 by default!
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: 32 bit SSL SMTP

Post by RichAlgeni »

I'll take a look at GnuTLS when I get a chance.

Upon further research, my desire for a process to just encrypt data, and to handle the networking myself was a bit hasty. Specifications involved show that a 'renegotiation' can occur at any time, and be requested by either side. This is better handled the way CryptLib handles it now.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: 32 bit SSL SMTP

Post by IdeasVacuum »

It is all such a huge minefield. :?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: 32 bit SSL SMTP

Post by RichAlgeni »

IdeasVacuum wrote:It is all such a huge minefield. :?
Indeed!
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: 32 bit SSL SMTP

Post by IdeasVacuum »

It's easy enough to use the OpenSSL.exe to send an email to any SSL/TLS enabled email server like Gmail, but it's restricted to ASCII as far as I can tell, and I can't drive it with PB - it makes the connection and presents it's own Console Window. I can do all of the inputs manually from there but not programatically.

GnuTLS has a similar pre-defined exe, gnutls-cli.exe. That makes the connection but then errors-out. The most recent bugfix was uploaded last night so hopefully it is good, but like OpenSSL, the documentation is very poor if you do not already know a lot about the subject.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: 32 bit SSL SMTP

Post by ricardo »

This dlls wirks for sending emails.
But does it works for receiving it?
ARGENTINA WORLD CHAMPION
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: 32 bit SSL SMTP

Post by RichAlgeni »

It should work fine if you graft the SSL code into a POP3 program.
User avatar
doctorized
Addict
Addict
Posts: 882
Joined: Fri Mar 27, 2009 9:41 am
Location: Athens, Greece

Re: 32 bit SSL SMTP

Post by doctorized »

I tried the above code but both x86 and x64 version is not working.
In both cases "Password Failed: 534" is returned. The password is writen 100% correct.
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: 32 bit SSL SMTP

Post by RichAlgeni »

Let's see your code.
User avatar
doctorized
Addict
Addict
Posts: 882
Joined: Fri Mar 27, 2009 9:41 am
Location: Athens, Greece

Re: 32 bit SSL SMTP

Post by doctorized »

RichAlgeni wrote:Let's see your code.
I used the code as is in the zip file in the first post in the first page.
(http://www.rca2.com/dlls/Cryptlibdlls.zip)
I just wrote these settings:

Code: Select all

Define mailHost.s         = "smtp.mail.yahoo.com"           ; SMTP Host
Define lenMailHost.i      = Len(mailHost)
Define mailPort.i         = 465
Define mailFrom.s         = "xxxx@yahoo.com";"
Define userName.s         = "xxx@yahoo.com"           ; your gmail account
Define lenUserName.i      = Len(userName)
Define password.s         = "zzzzzz"                 ; your password
Define lenPassword.i      = Len(password)
Define mailTo.s           = "vvvvv@yahoo.com"
Today, PB x64 with email_ssl64 shows only: "Unknown error code: 4294967264" and PB x86 with email_ssl32 shows only "Bad/unrecognised data format". PB 5.22 LTS is used in both cases.
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: 32 bit SSL SMTP

Post by RichAlgeni »

Yahoo does not let you use an external email interface unless you pay for it.
User avatar
doctorized
Addict
Addict
Posts: 882
Joined: Fri Mar 27, 2009 9:41 am
Location: Athens, Greece

Re: 32 bit SSL SMTP

Post by doctorized »

RichAlgeni wrote:Yahoo does not let you use an external email interface unless you pay for it.
Some months ago I could send mails with yahoo account but I couldn't recieve. Something changed?
The same problem happens with hotmail.

Code: Select all

Define mailHost.s         = "smtp.live.com";  "smtp.mail.yahoo.com";"smtp.gmail.com"               ; SMTP Host
Define lenMailHost.i      = Len(mailHost)
Define mailPort.i         = 465
Define mailFrom.s         = "xxxx@hotmail.com";"
Define userName.s         = "xxxx@hotmail.com"           
Define lenUserName.i      = Len(userName)
Define password.s         = "zzzz"                 ; your password
Define lenPassword.i      = Len(password)
Define mailTo.s           = "vvvv@yahoo.com"
User avatar
RichAlgeni
Addict
Addict
Posts: 935
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: 32 bit SSL SMTP

Post by RichAlgeni »

Have you ever had it working for GMail? Have you tried it recently?
User avatar
doctorized
Addict
Addict
Posts: 882
Joined: Fri Mar 27, 2009 9:41 am
Location: Athens, Greece

Re: 32 bit SSL SMTP

Post by doctorized »

RichAlgeni wrote:Have you ever had it working for GMail? Have you tried it recently?
I created a gmail account a few weeks ago. Yesterday it was the first time I tried it and the code returns "Password failed: 534". Some months ago I could send emails via hotmail and yahoo without SSL using this code:http://purebasic.fr/english/viewtopic.p ... =send+mail but now it is not working either. Yahoo and hotmail tell these:

Code: Select all

> Ehlo MAIN-SERVER
> AUTH LOGIN
cmdID = 530  =  5.7.0 Must issue a STARTTLS command first
gmail:

Code: Select all

> Ehlo MAIN-SERVER
> AUTH LOGIN
cmdID = 530  =  5.7.0 Must issue a STARTTLS command first. o3sm2226849wiy.18 - gsmtp
Post Reply