PB.Ex Mail (Windows)
-
- Enthusiast
- Posts: 152
- Joined: Fri Mar 29, 2013 4:55 pm
- Location: The Netherland
Re: PB.Ex Mail (Windows)
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
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)
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 !!
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 !!
- RSBasic
- Moderator
- Posts: 1228
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex Mail (Windows)
HelloLittle_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
Sorry for the late reply.
What error occurs?
- RSBasic
- Moderator
- Posts: 1228
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex Mail (Windows)
PB.Ex Mail 1.1.6.0 has been released.
Changelog:

The following exception occurs:
Anyone an idea?
Changelog:
- Updated: .NET Framework 4.5.2 > .NET Framework 4.8 (required for TLS 1.3)
- Added: TLS 1.3 support
Done, I added TLS 1.3 support.
I can confirm it with my GMX account (also with TLS 1.3) but I have no solution.drgolf wrote: Tue Jun 20, 2023 1:43 pm I cant access my mails on my GMX mailbox... (SSPI call error is returned... ?)

The following exception occurs:
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.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)

Anyone an idea?
Which provider does it work?
Re: PB.Ex Mail (Windows)
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 ?
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 ?
- RSBasic
- Moderator
- Posts: 1228
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex Mail (Windows)
All required data will be sent.
That is very strange. Maybe there was a certificate change.
I tested with the following mail providers:
GMX (belongs to IONOS)
Web.de (belongs to IONOS)
Orange.fr
Strato (belongs to IONOS)
IONOS
T-Online
Hotmail
Google Mail
Hosting.de
Outlook
Mail.de
Yahoo
Freenet
AOL
Vodafone
1blu
emailn.de
Mailbox
Re: PB.Ex Mail (Windows)
Somebody tell me that in place using :
use :
Maybe this help.
Code: Select all
client.Connect(host,port,false);
Code: Select all
client.Connect(host,port,SecureSocketOptions.None);
Re: PB.Ex Mail (Windows)
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 :
takes 14 seconds to execute (before maybe 2 or 3 seconds).
I tried the flag instead of , a little bit better (from 14 to 7 seconds)...
The command used to open mailbox is :
Do you have any idea ? Already encountered this case ?
Thanks a lot in advance !
Gaëtan
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$)
I tried the
Code: Select all
#PBEx_Mail_FetchType_OnlyHeaderData
Code: Select all
#PBEx_Mail_FetchType_AllData
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$)
Thanks a lot in advance !
Gaëtan
Purebasic 6.12 64 bits - Windows 11 Pro 64 bits 23H2
- RSBasic
- Moderator
- Posts: 1228
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex Mail (Windows)
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:
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)
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.
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.
Purebasic 6.12 64 bits - Windows 11 Pro 64 bits 23H2
Re: PB.Ex Mail (Windows)
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?
- captain_skank
- Enthusiast
- Posts: 639
- Joined: Fri Oct 06, 2006 3:57 pm
- Location: England
Re: PB.Ex Mail (Windows)
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
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
- RSBasic
- Moderator
- Posts: 1228
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex Mail (Windows)
Hello captain_skank
HTML code is used by default. I.e. if you want to insert line breaks: <br>
HTML code is used by default. I.e. if you want to insert line breaks: <br>
- captain_skank
- Enthusiast
- Posts: 639
- Joined: Fri Oct 06, 2006 3:57 pm
- Location: England
Re: PB.Ex Mail (Windows)
Sorry for the delay in replying, works like a charm.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>
Thanks muchly.
- RSBasic
- Moderator
- Posts: 1228
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex Mail (Windows)
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.
\\Edit:
The question has disappeared.
