Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Networking and Web Programming
»
[CLOSED] Can't get email header (subject) from icloud using synapse
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Strange behavior TFontDia...
by
zoltanleo
[
Today
at 09:56:27 am]
What is the best free pot...
by
trev
[
Today
at 09:49:34 am]
Optimizing the counter co...
by
PascalDragon
[
Today
at 09:07:24 am]
Remote debugging on Raspb...
by
MarkMLl
[
Today
at 08:54:15 am]
Custom Control causes QTr...
by
alanphys
[
Today
at 08:46:29 am]
How can i run application...
by
rvk
[
Today
at 08:26:25 am]
Translation does not work...
by
Alienizering
[
Today
at 04:38:22 am]
about sqldb postgresql LO...
by
gucao
[
Today
at 02:56:58 am]
lazarus "i18n" PO Output ...
by
dbannon
[
Today
at 01:59:50 am]
MOVED: lazarus "i18n" PO ...
by
trev
[
Today
at 01:21:49 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [CLOSED] Can't get email header (subject) from icloud using synapse (Read 1105 times)
pcurtis
Hero Member
Posts: 935
[CLOSED] Can't get email header (subject) from icloud using synapse
«
on:
October 20, 2021, 02:04:36 pm »
I use this to connect to iclouds imap server,
Code: Pascal
[Select]
[+]
[-]
procedure
TForm1
.
CheckMail
(
aUsername
:
String
;
aPassword
:
String
;
aServer
:
String
)
;
var
imap
:
TIMAPSend
;
MimeMess
:
TMimeMess
;
begin
Application
.
ProcessMessages
;
imap
:
=
TIMAPSend
.
create
;
MimeMess
:
=
TMimeMess
.
Create
;
MimeMess
.
Header
.
CharsetCode
:
=
UTF_8
;
imap
.
FullSSL
:
=
true
;
imap
.
Username
:
=
aUsername
;
imap
.
Password
:
=
aPassword
;
imap
.
TargetHost
:
=
aServer
;
imap
.
TargetPort
:
=
'993'
;
imap
.
Timeout
:
=
2000
;
if
imap
.
login
then
begin
imap
.
SelectFolder
(
'INBOX'
)
;
imap
.
FetchMess
(
20
,
MimeMess
.
Lines
)
;
//yes the message exists and has a subject
MimeMess
.
DecodeMessage
;
ShowMessage
(
MimeMess
.
Header
.
Subject
)
;
..........
The login is OK, but fetching a mail always returns empty headers.
Any ideas?
«
Last Edit: October 20, 2021, 05:59:43 pm by pcurtis
»
Logged
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2
pcurtis
Hero Member
Posts: 935
Re: Can't get email header (subject) from icloud using synapse
«
Reply #1 on:
October 20, 2021, 05:58:49 pm »
Don't know what I've done but it works now
Ok, fetchmessage only gets the body on icloud, on other servers it gets headers + body
«
Last Edit: October 20, 2021, 06:07:48 pm by pcurtis
»
Logged
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Networking and Web Programming
»
[CLOSED] Can't get email header (subject) from icloud using synapse
TinyPortal
© 2005-2018