Libraryless. Click here for Pure Java version (2385L/17K/60K).
1 | !7 |
2 | |
3 | p { |
4 | veryBigConsole(); |
5 | print("Please enter gmail user name and press enter."); |
6 | consoleSetInput(or(gmailDefaultUser(), "my.gmail.name@gmail.com")); |
7 | S user = gmailGetHandle(readLine()); |
8 | gmailDefaultUser(user); |
9 | print("OK, set to: " + user); |
10 | print(); |
11 | print("Have password? " + yn(findGMailPasswordOpt(user) != null)); |
12 | |
13 | print("Please type a password if you want to change it."); |
14 | consoleSetInput(""); |
15 | S pass = trim(readLineHidden()); |
16 | if (nempty(pass)) { |
17 | S name = gmailPasswordFileName(user); |
18 | File file = findSecretFile(name); |
19 | if (file == null) |
20 | file = newFile(javaxSecretDir(), "GMail", name); |
21 | saveTextFile(file, pass); |
22 | print("Password saved!"); |
23 | } |
24 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005140 |
Snippet name: | GMail: Set user & password to use |
Eternal ID of this version: | #1005140/9 |
Text MD5: | fb71dd5326a684f9e099c856a184b589 |
Transpilation MD5: | 668c287e35372717275a5aea0645e861 |
Author: | stefan |
Category: | javax / gmail |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-14 00:20:30 |
Source code size: | 722 bytes / 24 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 583 / 918 |
Version history: | 8 change(s) |
Referenced in: | [show references] |