Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

19
LINES

< > BotCompany Repo | #1010554 // imapDefaultFolder

JavaX fragment (include)

1  
!include once #1015973 // JavaMail
2  
3  
/*static Folder imapDefaultFolder() {
4  
  ret imapDefaultFolder(imapDefaultUser());
5  
}
6  
7  
static Folder imapDefaultFolder(S user) {
8  
  ret imapDefaultFolder(user, findEmailPassword(user));
9  
}*/
10  
  
11  
static Folder imapDefaultFolder(S host, S user, S pass) ctex {
12  
  new Properties props;
13  
  props.setProperty("mail.store.protocol", "imaps");
14  
15  
  Session session = Session.getInstance(props, null);
16  
  Store store = session.getStore();
17  
  store.connect(host, user, pass);
18  
  ret store.getDefaultFolder();
19  
}

Author comment

Began life as a copy of #1003301

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1010554
Snippet name: imapDefaultFolder
Eternal ID of this version: #1010554/3
Text MD5: 34f23afb4f39a0735694180f6040107e
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-02 14:14:02
Source code size: 543 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 464 / 486
Version history: 2 change(s)
Referenced in: [show references]