PB.Ex Mail (Windows)
Re: PB.Ex Mail (Windows)
Any way convert html email to plain text?
Re: PB.Ex Mail (Windows)
Any idea with this error trying to login hotmail/outlook:
"Authentication failed because the remote party has closed the transport stream."
"Authentication failed because the remote party has closed the transport stream."
- RSBasic
- Moderator
- Posts: 1228
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: PB.Ex Mail (Windows)
I created a new Hotmail email address and tested it. Unfortunately, Hotmail is not supported.alxfrnds wrote: Mon Jan 15, 2024 8:40 pm Any idea with this error trying to login hotmail/outlook:
"Authentication failed because the remote party has closed the transport stream."
Re: PB.Ex Mail (Windows)
Hi community,
I'm trying to read mails from gmail.
WIth the following simple code (replace gmail credentials by yours), only the date is printed. I don't know why "subject", "body", "from", "to" items are not printed.
And nothing also with ErrorOutput$
I'm missing something obvious but what...
PureBasic 6.04 x64, Windows 11 Pro X64 23H2.
Result :
I'm trying to read mails from gmail.
WIth the following simple code (replace gmail credentials by yours), only the date is printed. I don't know why "subject", "body", "from", "to" items are not printed.
And nothing also with ErrorOutput$
I'm missing something obvious but what...
PureBasic 6.04 x64, Windows 11 Pro X64 23H2.
Code: Select all
XIncludeFile("PB.Ex_Mail.pbi")
DisableExplicit
OpenMailEx(1, #PBEx_Mail_Protocol_IMAP, "imap.gmail.com", 993, "xxx.yyy@gmail.com", "blabla", 1,#PBEx_Mail_ProtocolVersion_TLS13, @ErrorOutput$)
If ExamineMailEx(1, #PBEx_Mail_SeenType_AllMails, #PBEx_Mail_FetchType_AllData, 0, @ErrorOutput$)
While NextMailEntryEx(1, @ErrorOutput$)
MailEntrySubjectEx(1, @Output$, @ErrorOutput$)
Debug "Subject: " + Output$
Debug "ErrorOutput$ Subject:" + ErrorOutput$
MailEntryFromEx(1, @Output$, @ErrorOutput$)
Debug "From: " + Output$
Debug "ErrorOutput$ From:" + ErrorOutput$
MailEntryToEx(1, @Output$, @ErrorOutput$)
Debug "To: " + Output$
Debug "ErrorOutput$ To:" + ErrorOutput$
Debug "Date: " + FormatDate("%dd.%mm.%yyyy %hh:%ii:%ss", MailEntryDateEx(1, @ErrorOutput$))
Debug MailIDEx(1, @ErrorOutput$)
MailEntryBodyEx(1, @Output$, @ErrorOutput$)
Debug "Body: "+Output$
Debug "ErrorOutput$ Body:" + ErrorOutput$
Debug "--------------------------------------------------"
Wend
EndIf
;...
Subject:
ErrorOutput$ Subject:
From:
ErrorOutput$ From:
To:
ErrorOutput$ To:
Date: 01.03.2024 18:22:32
1
Body:
ErrorOutput$ Body:
0
--------------------------------------------------
Subject:
ErrorOutput$ Subject:
From:
ErrorOutput$ From:
To:
ErrorOutput$ To:
Date: 01.03.2024 18:27:14
2
Body:
ErrorOutput$ Body:
74
--------------------------------------------------
Subject:
ErrorOutput$ Subject:
From:
ErrorOutput$ From:
To:
ErrorOutput$ To:
Date: 01.03.2024 18:27:20
3
Body:
ErrorOutput$ Body:
143
--------------------------------------------------
Subject:
ErrorOutput$ Subject:
From:
ErrorOutput$ From:
To:
ErrorOutput$ To:
Date: 01.03.2024 18:34:21
4
Body:
ErrorOutput$ Body:
214
--------------------------------------------------
Subject:
ErrorOutput$ Subject:
From:
ErrorOutput$ From:
To:
ErrorOutput$ To:
Date: 13.03.2024 11:29:42
26
Body:
ErrorOutput$ Body:
293
--------------------------------------------------
Subject:
ErrorOutput$ Subject:
From:
ErrorOutput$ From:
To:
ErrorOutput$ To:
Date: 14.03.2024 00:17:07
27
Body:
ErrorOutput$ Body:
368
--------------------------------------------------
Subject:
ErrorOutput$ Subject:
From:
ErrorOutput$ From:
To:
ErrorOutput$ To:
Date: 14.03.2024 01:59:37
28
Body:
ErrorOutput$ Body:
436
--------------------------------------------------
Subject:
ErrorOutput$ Subject:
From:
ErrorOutput$ From:
To:
ErrorOutput$ To:
Date: 14.03.2024 11:36:16
29
Body:
ErrorOutput$ Body:
503
--------------------------------------------------
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
Try with:
Try with:
Code: Select all
XIncludeFile("PB.Ex_Mail.pbi")
Global Output$ = Space(1000000)
Global ErrorOutput$ = Space(128)
OpenMailEx(1,...
Re: PB.Ex Mail (Windows)
Pffff...
Thank you RSBasic and sorry for the inconvenience...
It works perfectly !
Below the corrected code :
Thank you RSBasic and sorry for the inconvenience...

It works perfectly !
Below the corrected code :
Code: Select all
XIncludeFile("PB.Ex_Mail.pbi")
Global Output$ = Space(1000000)
Global ErrorOutput$ = Space(128)
OpenMailEx(1, #PBEx_Mail_Protocol_IMAP, "imap.gmail.com", 993, "xxx.yyy@gmail.com", "blabla", 1,#PBEx_Mail_ProtocolVersion_TLS13, @ErrorOutput$)
If ExamineMailEx(1, #PBEx_Mail_SeenType_AllMails, #PBEx_Mail_FetchType_AllData, 0, @ErrorOutput$)
While NextMailEntryEx(1, @ErrorOutput$)
MailEntrySubjectEx(1, @Output$, @ErrorOutput$)
Debug "Subject: " + Output$
Debug "ErrorOutput$ Subject:" + ErrorOutput$
MailEntryFromEx(1, @Output$, @ErrorOutput$)
Debug "From: " + Output$
Debug "ErrorOutput$ From:" + ErrorOutput$
MailEntryToEx(1, @Output$, @ErrorOutput$)
Debug "To: " + Output$
Debug "ErrorOutput$ To:" + ErrorOutput$
Debug "Date: " + FormatDate("%dd.%mm.%yyyy %hh:%ii:%ss", MailEntryDateEx(1, @ErrorOutput$))
Debug MailIDEx(1, @ErrorOutput$)
MailEntryBodyEx(1, @Output$, @ErrorOutput$)
Debug "Body: "+Output$
Debug "ErrorOutput$ Body:" + ErrorOutput$
Debug "--------------------------------------------------"
Wend
EndIf
Purebasic 6.12 64 bits - Windows 11 Pro 64 bits 23H2