My program sends letters to contacts via GMail. This usually works very well, but we noticed that sometimes the letter that my program βthinksβ that it sent does not actually arrive in Gmail, not to mention the contacts. I thought that I could add a check to the program that accesses the Gmail's Sent Items folder to see if the message is actually sent.
I have code using the TIdPOP3 component, but it loads the headers from the inbox, not from the sent items. My question is: how can I access the headers in the sent items folder?
Below is the code I'm using. This is only test code, so there are no try / finally blocks, etc.
with pop do begin host:= 'pop.gmail.com'; username:= ' someone@gmail.com '; password:= .....; Port:= 995; Connect; if connected then with i:= checkmessages downto 1 do begin msg.clear; // msg is of type TIdMessage if retrieve (i, msg) then listbox1.items.add (msg.subject) end; disconnect end;
source share