not delete the message from email server using synapse in delphi - delphi

I am retrieving emails using synapse in delphi, but the messages are being deleted from the server. How can I retrieve the message without deleting it? Maybe the header only?
Thanks,
Joe

Are you sure emails are deleted, but you do not used pop3.Dele(i)?
I use POP3 with SSL and if I want to delete message then I had to use pop3.Dele(i). In Synapse wiki: http://synapse.ararat.cz/doku.php/public:howto:pop3samplessl there is my sample code to receive POP3 messages.
Maybe you use other protocol than POP3 then show us your code.

I have no hands-on experience with Synapse, but looking at the code (sourceforge trunk) you should be fine as long as you don't explicitly call the Dele method (which maps onto the DELE POP3 command). None of the other methods seems to delete the messages, including List and Retr.
How exactly are you retrieving those messages? Could you show some code?

Related

mailbox always empty when checking emails via imap

Our platform is regularly checking some of our clients mailbox looking for answered emails, so far it's been working perfectly but we recently got a client with a strange issue.
When i connect to the IMAP server and search for email on a given period of time (for instance all mails from yesterday), i just get an empty list. But when i check with the client on its mailbox i can see the mail received from yesterday. Her mail client was configured to use POP so i asked her to change to IMAP as POP is supposed to remove email from the mail server. Now she is using IMAP but i still can not see anything on the mail server.
To connect to the IMAP server i am using those instructions:
imap = Net::IMAP.new(server, port, ssl, nil, false) # OK
imap.login(login, pwd) # Authentification Successful
imap.select("INBOX") # Mailbox is OK
To look for email from yesterday i am using those criteria:
imap.search(["SEEN","SINCE","Sep-07-2015"]
imap.search(["SEEN","SINCE","Sep-07-2015"]
I even tried to look into other mailbox in case her mail didn't arrive on Inbox, i have listed her mailboxes with imap.list('', '') even so i can not find any mails. It feels her entire mailbox is empty on the server. Yet i can see her emails on the mail client.
I am at loss on this case and was wondering if anyone has an idea of what could be happening preventing me from discovering any emails via IMAP?
It seems you have incorrect date format: it should be similar to 8-Aug-2002 and not Aug-8-2002. Look here for other options. If that doesn't help, try some easier search with a more broader criteria, something like imap.search(['SUBJECT', 'hello']) and use instead of hello some real subject.
This article also may help.
Cheers!
you can use this syntaxe in php , example for yahoo
$inbox='{imap.mail.yahoo.com:993/imap/ssl/novalidate-cert}Inbox';
$mbox = imap_open($inbox,$username,$password);
imap_search($mbox, 'SINCE "'.date('d M Y',strtotime("-1 days")).'"');

Mailcore retrieving folders and compose functionality

I am using Mailcore (https://github.com/MailCore/mailcore2) for accessing IMAP mail.
I could able to get all the inbox mails using this sample given. I able to retrieve all the mail folders as well. I want to implement compose functionality using this. I am not getting API details or samples for this. Could someone please help me ?
IMAP is an email retrieval protocol, it is not used for sending. For that, you have SMTP. So you were probably just looking in the wrong place...
I've never used mailcore2, but after reviewing their wiki pages, I found their example for composing and sending messages using STMP here.

Receive, Store, Interact with emails rails application

With my rails application, I'm supposed to provide following features:
There a limited number of users interacting with my system (in order of 10 to 20)
Like any normal mail client users should be able to have an inbox page showing received message, response to individual email and etc....
The mail client part cannot be an external application, they want everything packaged into a single application!
Normally These emails should be stored for future use
In order to send a receive email, we do not need to setup a mail server. They will provide the server and we will fetch the message with POP3 or something else. Same goes for sending emails.
The application itself often needs to look into these message as well, so it should be able to access corresponding email objects.
Separate part of these applications can be handled with individual gems such as Mailman, ActionMailer, and etc...
But what would be your suggestions to get this done?
I suggestion customizing an open source solution according to your needs. This is a gem/project that you should look at https://github.com/mailboxer/mailboxer It has all the features that you mentioned and its straightforward in its customizations.

How do I ensure that the SEEN flag on an IMAP email message is not automatically marked as SEEN on doing getContent

I am dealing with a bad connection to an external IMAP server. I need my application to download messages from this mail server periodically. On many occasions, my code has already downloaded message using javamail and has executed message.getContent and is then processing individual body parts (attachments). While it is in the process of doing this, the connection can drop.
I need to thus make sure that messages are not marked as SEEN automatically on doing message.getContent, which is how Javamail behaves, as described in this reply here:
https://stackoverflow.com/a/7679091/303106
Is there any way to make sure messages that were not downloaded are not marked as SEEN?
Message msg = ...;
((IMAPMessage)msg).setPeek(true);
Yes, use the BODY.PEEK instead of just BODY when fetching the data, and/or use EXAMINE instead of SELECT to open a mailbox. I'll leave it as an excercise to the reader to read the javamail's documentation to see how these options relate to the features provided by the havamail.

How are people handling report email with Fast Reports + Delphi

As far as I can tell Fast Reports has trouble sending mail through certain providers, including Gmail, freely admit this issue and claim it will be fixed 'in the future'. It's going on 12 months since I've heard that from their support team with no change.
Anybody out there able to modify their code and/or override their preview form to get an email that works with every server?
Not heard about those problems - but what we do is when the user presses a 'send via email' button in the previewer we generate a PDF of the report using the FR PDF export component than use the Jedi JCL to send an email with attachment using the default MAPI client software.
This answer has more info.
FastReport, therefore, has no influence over the email sending part and it has been working fine for quite some time.
i had problems in the past with sending email thanks to the configuration of the server from my company, using the sender for fast reports of course,
what i did was use the SendMail event from the frxMailExport component, grabed the params passed and managed to send via indy

Resources