imap

How to configure trustStore for javax.net.ssl.trustStore on windows?

牧云@^-^@ 提交于 2019-12-20 02:29:35
问题 I'm trying to pull messages from an email server in java using imap and i run into this exception: DEBUG: JavaMail version 1.4.2 DEBUG: successfully loaded resource: /META-INF/javamail.default.providers DEBUG: Tables of loaded providers DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp

Prefetch preview text from JavaMail Message

喜夏-厌秋 提交于 2019-12-20 02:16:06
问题 I'm using JavaMail 1.5.2 to read messages from IMAP accounts. To reduce the number of requests to the host I prefetch some message data, like From, Date, Message-ID etc.: Folder folder = store.getFolder("inbox"); folder.open(Folder.READ_ONLY); FetchProfile fp = new FetchProfile(); fp.add(FetchProfile.Item.ENVELOPE); fp.add(FetchProfile.Item.CONTENT_INFO); fp.add("Message-ID"); Message msgs[] = folder.getMessages(); folder.fetch(msgs,fp); However, I want to also prefetch some parts of the

Trying to delete mail using node-imap

大憨熊 提交于 2019-12-20 01:52:45
问题 Trying to delete email in node.js using node-imap module. I open the INBOX in read/write mode: imap.openBox('INBOX', false, cb); I then fetch all the messages: var f = imap.seq.fetch("1:"+box.messages.total, { bodies: ['HEADER.FIELDS (FROM TO SUBJECT DATE)','TEXT'], struct: true }); I flag the mail to be deleted: msg.on('end', function() { imap.seq.addFlags(seqno, '\\Deleted', function(err) { } ); }); I close the mailbox with autopurge set to true imap.closeBox(true); But this doesn't work.

PHP creating a multidimensional array of message threads from a multidimensional array (IMAP)

若如初见. 提交于 2019-12-19 21:32:35
问题 My question is the following: If you look below you'll see there is a datastructure with message ids and then the final datastructure containing the message details which should be aggregated from imap_fetch_overview . The message ids are from imap_thread . The problem is its not putting the email details in the position where the message id is. Here is my datastructure: [5] => Array ( [0] => 5 [1] => 9 ) [10] => Array ( [0] => 10 [1] => 11 ) What I'd like to have is: [5] => Array ( [0] =>

PHP creating a multidimensional array of message threads from a multidimensional array (IMAP)

点点圈 提交于 2019-12-19 21:29:47
问题 My question is the following: If you look below you'll see there is a datastructure with message ids and then the final datastructure containing the message details which should be aggregated from imap_fetch_overview . The message ids are from imap_thread . The problem is its not putting the email details in the position where the message id is. Here is my datastructure: [5] => Array ( [0] => 5 [1] => 9 ) [10] => Array ( [0] => 10 [1] => 11 ) What I'd like to have is: [5] => Array ( [0] =>

Retrieve IMAP email based on date AND time?

痴心易碎 提交于 2019-12-19 19:51:22
问题 I'm trying to retrieve email using IMAP that's less than a certain number of hours old. I've looked over the specifications, and there is a SINCE method that accepts an RFC date. However, it ignores the time and timezone. Is there another method I can use to retrieve email based on date as well as time? Thanks 回答1: RFC 5032 documents the WITHIN extension which introduces the search keyword YOUNGER , which is what you're looking for. For example, to search for all emails less than 2 hours old:

Correct way to retrieve mails by IMAP in symfony2

戏子无情 提交于 2019-12-19 12:25:26
问题 I have to develop simple mail client in symfony2 using IMAP. Im wondering what is best way to retrieve messages from server (lets take a gmail as example)? I did something like this: public function indexAction($name) { $user = 'adress@gmail.com'; $password = 'password'; $mailbox = "{imap.gmail.com:993/imap/ssl}INBOX"; $mbx = imap_open($mailbox , $user , $password); $ck = imap_check($mbx); $mails = imap_fetch_overview($mbx,"1:5"); return $this->render('HtstMailBundle:Mail:index.html.twig'

Correct way to retrieve mails by IMAP in symfony2

为君一笑 提交于 2019-12-19 12:25:11
问题 I have to develop simple mail client in symfony2 using IMAP. Im wondering what is best way to retrieve messages from server (lets take a gmail as example)? I did something like this: public function indexAction($name) { $user = 'adress@gmail.com'; $password = 'password'; $mailbox = "{imap.gmail.com:993/imap/ssl}INBOX"; $mbx = imap_open($mailbox , $user , $password); $ck = imap_check($mbx); $mails = imap_fetch_overview($mbx,"1:5"); return $this->render('HtstMailBundle:Mail:index.html.twig'

Android JavaMail application - CertPathValidatorException: Trust anchor for certification path not found

我与影子孤独终老i 提交于 2019-12-19 11:59:31
问题 Please, before making this a duplicate, read my problem. I have read many questions and answers about this error when using self signed certificates. But, my problem is that I get this error when trying to connect to GMAIL imap server. So, I really need some help. My code is: private String[] ReadMailbox(String MailboxName) throws IOException { Properties props = new Properties(); props.setProperty("mail.store.protocol", "imaps"); props.setProperty("mail.imaps.port", "993"); List<String>

How to get rid of 'Failed to load IMAP envelope' Messaging Exception?

北战南征 提交于 2019-12-19 11:48:55
问题 I am trying to get the list of emails by Message msg[] = folder.getMessages(); . After that I am getting the details of each message, meanwhile I am getting javax.mail.MessagingException: Failed to load IMAP envelope exception for some message. This is protocol trace for the one message which producing error - A7 FETCH 2 (ENVELOPE INTERNALDATE RFC822.SIZE) * 2 FETCH (RFC822.SIZE 2567 INTERNALDATE "29-Apr-2011 13:49:01 +0000" ENVELOPE ("Fri, 29 Apr 2011 19:19:01 +0530" "I NEES YOUR ASSISANCE??