close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": /usr/lib/python2.7/dist-packages/libsvn/_core.so: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.
- Timestamp:
-
Aug 4, 2011, 3:17:54 PM (13 years ago)
- Author:
-
waue
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v3
|
v4
|
|
22 | 22 | |
23 | 23 | * 解壓縮後,將 javamail.jar 放到 classpath 內 |
| 24 | |
| 25 | * 測試將 /home/waue/Desktop/index.html 寄到 gmail |
24 | 26 | |
25 | 27 | * 程式碼 |
… |
… |
|
62 | 64 | String record = null; // name of folder in which to record mail |
63 | 65 | boolean debug = false; |
64 | | |
65 | 66 | int optind; |
66 | | /* |
67 | | |
68 | | |
69 | | for (optind = 0; optind < argv.length; optind++) { |
70 | | if (argv[optind].equals("-T")) { |
71 | | protocol = argv[++optind]; |
72 | | } else if (argv[optind].equals("-H")) { |
73 | | host = argv[++optind]; |
74 | | } else if (argv[optind].equals("-U")) { |
75 | | user = argv[++optind]; |
76 | | } else if (argv[optind].equals("-P")) { |
77 | | password = argv[++optind]; |
78 | | } else if (argv[optind].equals("-M")) { |
79 | | mailhost = argv[++optind]; |
80 | | } else if (argv[optind].equals("-f")) { |
81 | | record = argv[++optind]; |
82 | | } else if (argv[optind].equals("-s")) { |
83 | | subject = argv[++optind]; |
84 | | } else if (argv[optind].equals("-o")) { // originator |
85 | | from = argv[++optind]; |
86 | | } else if (argv[optind].equals("-c")) { |
87 | | cc = argv[++optind]; |
88 | | } else if (argv[optind].equals("-b")) { |
89 | | bcc = argv[++optind]; |
90 | | } else if (argv[optind].equals("-L")) { |
91 | | url = argv[++optind]; |
92 | | } else if (argv[optind].equals("-d")) { |
93 | | debug = true; |
94 | | } else if (argv[optind].equals("--")) { |
95 | | optind++; |
96 | | break; |
97 | | } else if (argv[optind].startsWith("-")) { |
98 | | System.out |
99 | | .println("Usage: sendhtml [[-L store-url] | [-T prot] [-H host] [-U user] [-P passwd]]"); |
100 | | System.out |
101 | | .println("\t[-s subject] [-o from-address] [-c cc-addresses] [-b bcc-addresses]"); |
102 | | System.out |
103 | | .println("\t[-f record-mailbox] [-M transport-host] [-d] [address]"); |
104 | | System.exit(1); |
105 | | } else { |
106 | | break; |
107 | | } |
108 | | } |
109 | | */ |
110 | 67 | |
111 | 68 | to = "waue0920@gmail.com"; |