Page 3 of 4
Re: PB.Ex Mail (Windows)
Posted: Wed Dec 22, 2021 10:36 pm
by Little_man
RSBasic,
A strange error occurs when updating to "PB.Ex Mail 1.1.5.0" in Windows 10 Home, x64.
After putting back "PB.Ex_Mail_x64.dll 1.1.3.0" the strange error has disappeared !!...
Kind regards
Little_man
Re: PB.Ex Mail (Windows)
Posted: Tue Jun 20, 2023 1:43 pm
by drgolf
Hello,
Please, is it possible to have TLS protocol 1.3 ?
I cant access my mails on my GMX mailbox... (SSPI call error is returned... ?)
The DLL works fine with other mailbox... Thanks !!
Re: PB.Ex Mail (Windows)
Posted: Sat Aug 26, 2023 2:08 pm
by RSBasic
Little_man wrote: Wed Dec 22, 2021 10:36 pm
RSBasic,
A strange error occurs when updating to
"PB.Ex Mail 1.1.5.0" in Windows 10 Home, x64.
After putting back
"PB.Ex_Mail_x64.dll 1.1.3.0" the strange error has disappeared !!...
Kind regards
Little_man
Hello
Sorry for the late reply.
What error occurs?
Re: PB.Ex Mail (Windows)
Posted: Wed Aug 30, 2023 8:19 pm
by RSBasic
PB.Ex Mail 1.1.6.0 has been released.
Changelog:
- Updated: .NET Framework 4.5.2 > .NET Framework 4.8 (required for TLS 1.3)
- Added: TLS 1.3 support
drgolf wrote: Tue Jun 20, 2023 1:43 pm
Please, is it possible to have TLS protocol 1.3 ?
Done, I added TLS 1.3 support.
drgolf wrote: Tue Jun 20, 2023 1:43 pm
I cant access my mails on my GMX mailbox... (SSPI call error is returned... ?)
I can confirm it with my GMX account (also with TLS 1.3) but I have no solution.

The following exception occurs:
A call to SSPI failed, see inner exception:
System.ComponentModel.Win32Exception (0x80004005): The function requested not supported
bei System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
bei System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
bei System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
bei System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
bei System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
bei System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest, Boolean renegotiation)
bei System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
bei System.Net.Security.SslStream.AuthenticateAsClient(String targetHost)
bei S22.Imap.ImapClient.Connect(String hostname, Int32 port, Boolean ssl, RemoteCertificateValidationCallback validate)
bei S22.Imap.ImapClient..ctor(String hostname, Int32 port, String username, String password, AuthMethod method, Boolean ssl, RemoteCertificateValidationCallback validate)
bei PBEx._OpenMailEx(Int32 ID, Int32 Protocol, String MailServer, Int32 Port, String UserName, String Password, Int32 SSL)
Void StartSendAuthResetSignal(System.Net.Security.ProtocolToken, System.Net.AsyncProtocolRequest, System.Exception)
If I run my class library in Windows Forms it works without SSPI errors, but in PureBasic I get the SSPI error. I don't know.

Anyone an idea?
drgolf wrote: Tue Jun 20, 2023 1:43 pm
The DLL works fine with other mailbox... Thanks !!
Which provider does it work?
Re: PB.Ex Mail (Windows)
Posted: Thu Aug 31, 2023 1:43 pm
by drgolf
Hello,
Very thanx for the update.
The DLL work with IKMAIL (infomaniak) but dont work anymore with Orange or GMX.
TLS 1.3 dont work too, but IKMAIL continue working.
I have message : Error: Échec d'un appel à SSPI, consultez l'exception interne on GMX...
The DLL work in june but in july no.
I have used Libcurl and IMAP for access mail box.
Maybe a parameter missing ?
Re: PB.Ex Mail (Windows)
Posted: Fri Sep 01, 2023 9:45 am
by RSBasic
Re: PB.Ex Mail (Windows)
Posted: Fri Sep 01, 2023 11:03 am
by drgolf
Somebody tell me that in place using :
use :
Code: Select all
client.Connect(host,port,SecureSocketOptions.None);
Maybe this help.
Re: PB.Ex Mail (Windows)
Posted: Wed Oct 04, 2023 12:35 pm
by GG
Hi everybody,
I'm trying to find the root cause of the extreme slowness when retrieving Gmail mails (14 seconds for each mail). 65 mails with only some text in the subject / title (50 chars).
Using this excellent lib since 2019, no problems since last days.
I've updated to last version (1.1.6.0 Pb Ex Mail, before 1.1.3.0), using PB 6.02 x64 under Windows 10 X64, same problems. Using TLS 1.3, with SSL enabled : Are these rights parameters for gmail mailbox ? However, Mails are well retrieved, but with slowness.
When looking a little bit further, the following command :
Code: Select all
ExamineMailEx(1, #PBEx_Mail_SeenType_AllMails, #PBEx_Mail_FetchType_AllData, 0, @ErrorOutput$)
takes 14 seconds to execute (before maybe 2 or 3 seconds).
I tried the
Code: Select all
#PBEx_Mail_FetchType_OnlyHeaderData
flag instead of
, a little bit better (from 14 to 7 seconds)...
The command used to open mailbox is :
Code: Select all
OpenMailEx(1, #PBEx_Mail_Protocol_IMAP, imap_server_name$, Val(imap_server_port$), imap_userid$, imap_password$, Val(ssl$),#PBEx_Mail_ProtocolVersion_TLS13, @ErrorOutput$)
Do you have any idea ? Already encountered this case ?
Thanks a lot in advance !
Gaëtan
Re: PB.Ex Mail (Windows)
Posted: Sat Oct 14, 2023 12:43 pm
by RSBasic
Hello GG
I tested with my Google account. I have 260 emails in my inbox.
For each email with #PBEx_Mail_FetchType_OnlyHeaderData and without get attachments: 500-600 milliseconds
For each email with #PBEx_Mail_FetchType_AllData and without get attachments: 600-700 milliseconds
For each email with #PBEx_Mail_FetchType_OnlyHeaderData and with get attachments: 800-900 milliseconds
For each email with #PBEx_Mail_FetchType_AllData and with get attachments: 900-1000 milliseconds
I have no idea why it's slow for you.
My test code:
Code: Select all
;...
If ExamineMailEx(1, #PBEx_Mail_SeenType_AllMails, #PBEx_Mail_FetchType_OnlyHeaderData, 0, @ErrorOutput$)
While NextMailEntryEx(1, @ErrorOutput$)
MailEntrySubjectEx(1, @Output$, @ErrorOutput$)
Debug "Subject: " + Output$
MailEntryFromEx(1, @Output$, @ErrorOutput$)
Debug "From: " + Output$
MailEntryToEx(1, @Output$, @ErrorOutput$)
Debug "To: " + Output$
Debug "Date: " + FormatDate("%dd.%mm.%yyyy %hh:%ii:%ss", MailEntryDateEx(1, @ErrorOutput$))
Debug MailIDEx(1, @ErrorOutput$)
; Debug Str(CountMailAttachmentsEx(1, @ErrorOutput$)) + " attachment(s)"
; If ExamineMailAttachmentsEx(1, @ErrorOutput$)
; While NextMailEntryAttachmentsEx(1, @ErrorOutput$)
; If MailEntryAttachmentsFileNameEx(1, @Output$, @ErrorOutput$)
; Debug Output$
; EndIf
; Wend
; EndIf
Debug ElapsedMilliseconds() - StartTime
StartTime.q = ElapsedMilliseconds()
Debug "--------------------------------------------------"
Wend
EndIf
;...
Re: PB.Ex Mail (Windows)
Posted: Wed Oct 18, 2023 9:51 am
by GG
Hello RSBasic,
Things are getting better, I retrieved "normal" timings, I suppose it came from Google, no changes from my part.
Thanks again for your lib and support.
Re: PB.Ex Mail (Windows)
Posted: Sat Nov 18, 2023 4:02 am
by BarryG
Tried this code again to read my Gmail Inbox (using IMAP) and it connects, but nothing is output. That is, none of the code between "While NextMailEntryEx(1, @PBEx_Mail_ErrorOutput$)" and "Wend" is executed, so I don't get the Debug output of "Subject" etc. Any ideas?
Re: PB.Ex Mail (Windows)
Posted: Thu Jan 04, 2024 12:10 pm
by captain_skank
Hi and a Happy 2024,
Going to sound like a silly question, but when using :
Result = SendMailEx(ID, Subject$, Body$, Priority, From$, ToAddress$, CC$, BCC$, Attachments$, @ErrorOutput$)
How do format the text for the Body$ ?
I thought using #crlf$ would insert linebreaks but it doesn't.
Any help appreciated.
Cheers
Re: PB.Ex Mail (Windows)
Posted: Thu Jan 04, 2024 2:44 pm
by RSBasic
Hello captain_skank
HTML code is used by default. I.e. if you want to insert line breaks: <br>
Re: PB.Ex Mail (Windows)
Posted: Mon Jan 08, 2024 9:54 am
by captain_skank
RSBasic wrote: Thu Jan 04, 2024 2:44 pm
Hello captain_skank
HTML code is used by default. I.e. if you want to insert line breaks: <br>
Sorry for the delay in replying, works like a charm.
Thanks muchly.
Re: PB.Ex Mail (Windows)
Posted: Mon Jan 15, 2024 3:00 pm
by RSBasic
Yes, you'll need to create an app password for your application in Gmail. Then you can use it in PureBasic:
https://support.google.com/mail/answer/185833?hl=en
\\Edit:
The question has disappeared.
