修訂 | 0a5f98815b336a57884ec73a93dfef2b81dd5efe (tree) |
---|---|
時間 | 2011-05-06 14:23:12 |
作者 | Takuya Ono <takuya-o@user...> |
Commiter | Takuya Ono |
Support: [ #25090 ] TLS/SSL SMTP server connection suuport. Ph.1
@@ -1,3 +1,6 @@ | ||
1 | +annotation.processing.enabled=true | |
2 | +annotation.processing.enabled.in.editor=false | |
3 | +annotation.processing.run.all.processors=true | |
1 | 4 | application.args= |
2 | 5 | application.homepage=https://sourceforge.jp/projects/mdc |
3 | 6 | application.title=mdc2 |
@@ -29,12 +32,16 @@ file.reference.BetaProject-test=src | ||
29 | 32 | includes=** |
30 | 33 | j2ee.platform=1.4 |
31 | 34 | j2ee.server.type=Tomcat55 |
32 | -jar.compress=false | |
35 | +jar.archive.disabled=${jnlp.enabled} | |
36 | +jar.compress=true | |
37 | +jar.index=${jnlp.enabled} | |
33 | 38 | javac.classpath=\ |
34 | 39 | ${libs.swing-layout.classpath} |
35 | 40 | # Space-separated list of extra javac options |
36 | 41 | javac.compilerargs=-Xlint:unchecked -encoding UTF-8 |
37 | 42 | javac.deprecation=true |
43 | +javac.processorpath=\ | |
44 | + ${javac.classpath} | |
38 | 45 | javac.source=1.4 |
39 | 46 | javac.target=1.4 |
40 | 47 | javac.test.classpath=\ |
@@ -54,7 +61,9 @@ javadoc.version=false | ||
54 | 61 | javadoc.windowtitle=-charset UTF-8 -docencoding UTF-8 |
55 | 62 | jnlp.codebase.type=local |
56 | 63 | jnlp.codebase.url=file:/home/mirara/tkyn/src/NetBeansTest/BetaProject/dist/ |
64 | +jnlp.descriptor=application | |
57 | 65 | jnlp.enabled=false |
66 | +jnlp.mixed.code=defaut | |
58 | 67 | jnlp.offline-allowed=false |
59 | 68 | jnlp.signed=false |
60 | 69 | main.class=org.jent.checksmtp.ApplicationUI |
@@ -15,9 +15,11 @@ import java.util.Properties; | ||
15 | 15 | * <H3>Properties</H3> |
16 | 16 | * <DL> |
17 | 17 | * <DT> -.port <DD>Service port number. (Default:8725) |
18 | + * <DT> -.ssl <DD>Service port use SSL. (Default:false) //Not use yet. | |
18 | 19 | * <DT> -.enableRemoteConnect <DD>Permit connect from remote host. (Default:false) |
19 | 20 | * <DT> -.serverHost <DD>STMP Server host name. (Default:mail) |
20 | 21 | * <DT> -.serverPort <DD>STMP Server port. (Default:25) |
22 | + * <DT> -.serverSSL <DD>SMTP Server port use SSL. (Default:false) | |
21 | 23 | * <DT> -.confirm.timeout <DD> Confirm auto push OK timeput (Default:0 = forever) |
22 | 24 | * <DT> -.ladp <DD>If "true" use LDAP search. (Default:false) |
23 | 25 | * <DT> -.ldap.providerUrl <DD>LDAP Provider URL (Default:ldap://localhost:389 |
@@ -31,9 +33,11 @@ import java.util.Properties; | ||
31 | 33 | public class ApplicationProperties { |
32 | 34 | private static final String PREFIX = "org.jent.checksmtp"; |
33 | 35 | private static final String SMTP_PORT = PREFIX + ".port"; |
36 | + private static final String SMTP_SSL = PREFIX + ".SSL"; | |
34 | 37 | private static final String SMTP_ENEBLE_REMOTE_CONNECT = PREFIX + ".enableRemoteConnect"; |
35 | 38 | private static final String SMTP_SERVER_HOST = PREFIX + ".serverHost"; |
36 | 39 | private static final String SMTP_SERVER_PORT = PREFIX + ".serverPort"; |
40 | + private static final String SMTP_SERVER_SSL = PREFIX + ".serverSSL"; | |
37 | 41 | private static final String CONFIRM_TIMEOUT = PREFIX + ".confirmTimeout"; |
38 | 42 | private static final String LDAP_PREFIX = PREFIX + ".ldap"; |
39 | 43 | private static final String LDAP_PROVIDER_URL = LDAP_PREFIX + ".providerUrl"; |
@@ -109,10 +113,19 @@ public class ApplicationProperties { | ||
109 | 113 | public static int getSmtpServerPort() { |
110 | 114 | return Integer.parseInt(applicationProperties.getProperty(SMTP_SERVER_PORT, "25")); |
111 | 115 | } |
112 | - | |
116 | + | |
113 | 117 | public static void setSmtpServerPort(int port) { |
114 | 118 | applicationProperties.setProperty(SMTP_SERVER_PORT, new Integer(port).toString()); |
115 | 119 | } |
120 | + | |
121 | + public static boolean getSmtpServerSSL() { | |
122 | + //getProperty(str) default value is null. valueOf(null) retrun FALSE. | |
123 | + return Boolean.valueOf(applicationProperties.getProperty(SMTP_SERVER_SSL)).booleanValue(); | |
124 | + } | |
125 | + | |
126 | + public static void setSmtpServerSSL(boolean ssl) { | |
127 | + applicationProperties.setProperty(SMTP_SERVER_SSL, Boolean.toString(ssl)); | |
128 | + } | |
116 | 129 | |
117 | 130 | public static int getSmtpPort() { |
118 | 131 | return Integer.parseInt(applicationProperties.getProperty(SMTP_PORT, "8725")); |
@@ -121,10 +134,18 @@ public class ApplicationProperties { | ||
121 | 134 | public static void setSmtpPort(int port) { |
122 | 135 | applicationProperties.setProperty(SMTP_PORT, new Integer(port).toString()); |
123 | 136 | } |
124 | - | |
137 | + | |
138 | + public static boolean getSmtpSSL() { | |
139 | + return Boolean.valueOf(applicationProperties.getProperty(SMTP_SSL)).booleanValue(); | |
140 | + } | |
141 | + | |
142 | + public static void setSmtpSSL(boolean ssl) { | |
143 | + applicationProperties.setProperty(SMTP_SSL, Boolean.toString(ssl)); | |
144 | + } | |
145 | + | |
125 | 146 | public static boolean getSmtpEnebleRemoteConnect() { |
126 | 147 | String str = applicationProperties.getProperty(SMTP_ENEBLE_REMOTE_CONNECT); |
127 | - return new Boolean(str).booleanValue(); | |
148 | + return Boolean.valueOf(str).booleanValue(); | |
128 | 149 | } |
129 | 150 | |
130 | 151 | public static void setSmtpEnableRemoteConnect(boolean obj) { |
@@ -148,7 +169,7 @@ public class ApplicationProperties { | ||
148 | 169 | } |
149 | 170 | |
150 | 171 | public static boolean getLdapIsSjis() { |
151 | - return new Boolean(applicationProperties.getProperty(LDAP_IS_SJIS)).booleanValue(); | |
172 | + return Boolean.valueOf(applicationProperties.getProperty(LDAP_IS_SJIS)).booleanValue(); | |
152 | 173 | } |
153 | 174 | |
154 | 175 | public static void setLdapIsSjis(boolean obj) { |
@@ -157,7 +178,8 @@ public class ApplicationProperties { | ||
157 | 178 | |
158 | 179 | public static boolean getLdap() { |
159 | 180 | String str = applicationProperties.getProperty(LDAP_PREFIX); |
160 | - Boolean flg = new Boolean(str); | |
181 | + //the value true if the string is ignoring case "true". | |
182 | + Boolean flg = Boolean.valueOf(str); | |
161 | 183 | return flg.booleanValue(); |
162 | 184 | } |
163 | 185 |
@@ -1,4 +1,4 @@ | ||
1 | -<?xml version="1.0" encoding="UTF-8" ?> | |
1 | +<?xml version="1.1" encoding="UTF-8" ?> | |
2 | 2 | |
3 | 3 | <Form version="1.4" maxVersion="1.4" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> |
4 | 4 | <Properties> |
@@ -18,6 +18,8 @@ | ||
18 | 18 | <EventHandler event="windowIconified" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowIconified"/> |
19 | 19 | </Events> |
20 | 20 | <AuxValues> |
21 | + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> | |
22 | + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> | |
21 | 23 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> |
22 | 24 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/> |
23 | 25 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/> |
@@ -32,13 +34,13 @@ | ||
32 | 34 | <Group type="102" attributes="0"> |
33 | 35 | <EmptySpace max="-2" attributes="0"/> |
34 | 36 | <Component id="jButtonQuit" linkSize="1" min="-2" max="-2" attributes="0"/> |
35 | - <EmptySpace pref="148" max="32767" attributes="0"/> | |
37 | + <EmptySpace pref="190" max="32767" attributes="0"/> | |
36 | 38 | <Component id="jButtonOK" linkSize="1" min="-2" max="-2" attributes="0"/> |
37 | 39 | <EmptySpace max="-2" attributes="0"/> |
38 | 40 | <Component id="jButtonCancel" linkSize="1" min="-2" max="-2" attributes="0"/> |
39 | 41 | <EmptySpace max="-2" attributes="0"/> |
40 | 42 | </Group> |
41 | - <Component id="jTabbedPane" alignment="0" pref="394" max="32767" attributes="0"/> | |
43 | + <Component id="jTabbedPane" alignment="0" pref="463" max="32767" attributes="0"/> | |
42 | 44 | </Group> |
43 | 45 | </DimensionLayout> |
44 | 46 | <DimensionLayout dim="1"> |
@@ -81,31 +83,35 @@ | ||
81 | 83 | <Group type="102" attributes="0"> |
82 | 84 | <EmptySpace min="-2" max="-2" attributes="0"/> |
83 | 85 | <Group type="103" groupAlignment="0" attributes="0"> |
84 | - <Group type="102" alignment="0" attributes="0"> | |
85 | - <Component id="jLabel1" linkSize="2" min="-2" max="-2" attributes="0"/> | |
86 | - <EmptySpace min="-2" max="-2" attributes="0"/> | |
87 | - <Component id="jTextFieldReceiverPort" pref="73" max="32767" attributes="0"/> | |
88 | - <EmptySpace max="-2" attributes="0"/> | |
86 | + <Group type="102" attributes="0"> | |
87 | + <Group type="103" groupAlignment="0" attributes="0"> | |
88 | + <Group type="102" alignment="0" attributes="0"> | |
89 | + <Component id="jLabel7" min="-2" max="-2" attributes="0"/> | |
90 | + <EmptySpace max="-2" attributes="0"/> | |
91 | + <Component id="jTextFieldConfirmTimeout" min="-2" pref="30" max="-2" attributes="1"/> | |
92 | + </Group> | |
93 | + <Group type="102" alignment="0" attributes="0"> | |
94 | + <Component id="jLabel1" linkSize="2" min="-2" max="-2" attributes="0"/> | |
95 | + <EmptySpace max="-2" attributes="0"/> | |
96 | + <Component id="jTextFieldReceiverPort" min="-2" pref="47" max="-2" attributes="0"/> | |
97 | + </Group> | |
98 | + </Group> | |
99 | + <EmptySpace pref="77" max="32767" attributes="0"/> | |
89 | 100 | <Component id="jCheckBoxEnableRemoteConnect" min="-2" pref="207" max="-2" attributes="0"/> |
90 | 101 | </Group> |
91 | - <Group type="102" alignment="0" attributes="0"> | |
92 | - <Component id="jLabel7" min="-2" max="-2" attributes="0"/> | |
93 | - <EmptySpace max="-2" attributes="0"/> | |
94 | - <Component id="jTextFieldConfirmTimeout" pref="266" max="32767" attributes="0"/> | |
95 | - <EmptySpace max="-2" attributes="0"/> | |
96 | - </Group> | |
97 | - <Group type="102" alignment="1" attributes="0"> | |
102 | + <Group type="102" attributes="0"> | |
98 | 103 | <Component id="jLabel2" linkSize="2" min="-2" max="-2" attributes="0"/> |
99 | 104 | <EmptySpace min="-2" max="-2" attributes="0"/> |
100 | - <Component id="jTextFieldServerHost" pref="154" max="32767" attributes="0"/> | |
105 | + <Component id="jTextFieldServerHost" pref="166" max="32767" attributes="0"/> | |
101 | 106 | <EmptySpace min="-2" max="-2" attributes="0"/> |
102 | 107 | <Component id="jLabel3" min="-2" max="-2" attributes="0"/> |
103 | 108 | <EmptySpace min="-2" max="-2" attributes="0"/> |
104 | - <Component id="jTextFieldServerPort" pref="81" max="32767" attributes="0"/> | |
109 | + <Component id="jTextFieldServerPort" min="-2" pref="49" max="-2" attributes="0"/> | |
105 | 110 | <EmptySpace min="-2" max="-2" attributes="0"/> |
111 | + <Component id="jCheckBoxServerSSL" min="-2" max="-2" attributes="2"/> | |
112 | + <EmptySpace min="-2" max="-2" attributes="1"/> | |
106 | 113 | </Group> |
107 | 114 | </Group> |
108 | - <EmptySpace min="-2" max="-2" attributes="0"/> | |
109 | 115 | </Group> |
110 | 116 | </Group> |
111 | 117 | </DimensionLayout> |
@@ -122,10 +128,11 @@ | ||
122 | 128 | <Group type="103" groupAlignment="3" attributes="0"> |
123 | 129 | <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> |
124 | 130 | <Component id="jTextFieldServerHost" alignment="3" min="-2" max="-2" attributes="0"/> |
131 | + <Component id="jCheckBoxServerSSL" alignment="3" min="-2" max="-2" attributes="0"/> | |
132 | + <Component id="jTextFieldServerPort" alignment="3" min="-2" pref="19" max="-2" attributes="0"/> | |
125 | 133 | <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> |
126 | - <Component id="jTextFieldServerPort" alignment="3" min="-2" max="-2" attributes="0"/> | |
127 | 134 | </Group> |
128 | - <EmptySpace pref="35" max="32767" attributes="0"/> | |
135 | + <EmptySpace pref="25" max="32767" attributes="0"/> | |
129 | 136 | <Group type="103" groupAlignment="3" attributes="0"> |
130 | 137 | <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> |
131 | 138 | <Component id="jTextFieldConfirmTimeout" alignment="3" min="-2" max="-2" attributes="0"/> |
@@ -172,6 +179,9 @@ | ||
172 | 179 | <Dimension value="[44, 19]"/> |
173 | 180 | </Property> |
174 | 181 | </Properties> |
182 | + <Events> | |
183 | + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldReceiverPortActionPerformed"/> | |
184 | + </Events> | |
175 | 185 | </Component> |
176 | 186 | <Component class="javax.swing.JTextField" name="jTextFieldServerHost"> |
177 | 187 | <Properties> |
@@ -243,6 +253,19 @@ | ||
243 | 253 | </Property> |
244 | 254 | </Properties> |
245 | 255 | </Component> |
256 | + <Component class="javax.swing.JCheckBox" name="jCheckBoxServerSSL"> | |
257 | + <Properties> | |
258 | + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> | |
259 | + <ResourceString bundle="org/jent/checksmtp/Bundle.properties" key="ApplicationUI.jCheckBoxServerSSL.text" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> | |
260 | + </Property> | |
261 | + <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> | |
262 | + <ResourceString bundle="org/jent/checksmtp/Bundle.properties" key="ApplicationUI.jCheckBoxServerSSL.toolTipText" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> | |
263 | + </Property> | |
264 | + </Properties> | |
265 | + <Events> | |
266 | + <EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="jCheckBoxServerSSLStateChanged"/> | |
267 | + </Events> | |
268 | + </Component> | |
246 | 269 | </SubComponents> |
247 | 270 | </Container> |
248 | 271 | <Container class="javax.swing.JPanel" name="jPanelLDAP"> |
@@ -273,10 +296,10 @@ | ||
273 | 296 | </Group> |
274 | 297 | <EmptySpace max="-2" attributes="0"/> |
275 | 298 | <Group type="103" groupAlignment="0" attributes="0"> |
276 | - <Component id="jTextFieldAttribute" alignment="0" pref="301" max="32767" attributes="0"/> | |
277 | - <Component id="jTextFieldBaseDn" pref="301" max="32767" attributes="0"/> | |
299 | + <Component id="jTextFieldAttribute" alignment="0" pref="353" max="32767" attributes="0"/> | |
300 | + <Component id="jTextFieldBaseDn" pref="353" max="32767" attributes="0"/> | |
278 | 301 | <Group type="102" alignment="0" attributes="0"> |
279 | - <Component id="jTextFieldProviderUrl" pref="221" max="32767" attributes="0"/> | |
302 | + <Component id="jTextFieldProviderUrl" pref="261" max="32767" attributes="0"/> | |
280 | 303 | <EmptySpace max="-2" attributes="0"/> |
281 | 304 | <Component id="jCheckBoxIsSjis" min="-2" max="-2" attributes="0"/> |
282 | 305 | </Group> |
@@ -312,7 +335,7 @@ | ||
312 | 335 | <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> |
313 | 336 | <Component id="jTextFieldAttribute" alignment="3" min="-2" max="-2" attributes="0"/> |
314 | 337 | </Group> |
315 | - <EmptySpace pref="22" max="32767" attributes="0"/> | |
338 | + <EmptySpace max="32767" attributes="0"/> | |
316 | 339 | </Group> |
317 | 340 | </Group> |
318 | 341 | </DimensionLayout> |
@@ -444,7 +467,7 @@ | ||
444 | 467 | <Component id="jLabelSfURL" min="-2" max="-2" attributes="0"/> |
445 | 468 | </Group> |
446 | 469 | </Group> |
447 | - <EmptySpace max="32767" attributes="0"/> | |
470 | + <EmptySpace pref="38" max="32767" attributes="0"/> | |
448 | 471 | </Group> |
449 | 472 | </Group> |
450 | 473 | </DimensionLayout> |
@@ -458,7 +481,7 @@ | ||
458 | 481 | </Group> |
459 | 482 | <EmptySpace max="-2" attributes="0"/> |
460 | 483 | <Component id="jLabelSfURL" min="-2" max="-2" attributes="0"/> |
461 | - <EmptySpace pref="60" max="32767" attributes="0"/> | |
484 | + <EmptySpace pref="57" max="32767" attributes="0"/> | |
462 | 485 | </Group> |
463 | 486 | </Group> |
464 | 487 | </DimensionLayout> |
@@ -42,9 +42,11 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
42 | 42 | } |
43 | 43 | |
44 | 44 | private void resetDisplay() { |
45 | + //reset display data from ApplicationProperties. | |
45 | 46 | jTextFieldReceiverPort.setText(Integer.toString(ApplicationProperties.getSmtpPort())); |
46 | 47 | jTextFieldServerHost.setText(ApplicationProperties.getSmtpServerHost()); |
47 | 48 | jTextFieldServerPort.setText(Integer.toString(ApplicationProperties.getSmtpServerPort())); |
49 | + jCheckBoxServerSSL.setSelected(ApplicationProperties.getSmtpServerSSL()); | |
48 | 50 | jCheckBoxEnableRemoteConnect.setSelected(ApplicationProperties.getSmtpEnebleRemoteConnect()); |
49 | 51 | jTextFieldConfirmTimeout.setText(Integer.toString(ApplicationProperties.getConfirmTimeout())); |
50 | 52 |
@@ -124,8 +126,9 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
124 | 126 | * WARNING: Do NOT modify this code. The content of this method is |
125 | 127 | * always regenerated by the Form Editor. |
126 | 128 | */ |
127 | - // <editor-fold defaultstate="collapsed" desc=" Generated Code">//GEN-BEGIN:initComponents | |
129 | + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents | |
128 | 130 | private void initComponents() { |
131 | + | |
129 | 132 | jTabbedPane = new javax.swing.JTabbedPane(); |
130 | 133 | jPanelMail = new javax.swing.JPanel(); |
131 | 134 | jLabel1 = new javax.swing.JLabel(); |
@@ -137,6 +140,7 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
137 | 140 | jCheckBoxEnableRemoteConnect = new javax.swing.JCheckBox(); |
138 | 141 | jLabel7 = new javax.swing.JLabel(); |
139 | 142 | jTextFieldConfirmTimeout = new javax.swing.JTextField(); |
143 | + jCheckBoxServerSSL = new javax.swing.JCheckBox(); | |
140 | 144 | jPanelLDAP = new javax.swing.JPanel(); |
141 | 145 | jCheckBoxLdap = new javax.swing.JCheckBox(); |
142 | 146 | jLabel4 = new javax.swing.JLabel(); |
@@ -177,6 +181,11 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
177 | 181 | jTextFieldReceiverPort.setToolTipText(bundle.getString("ApplicationUI.jTextFieldReceiverPort.toolTipText")); // NOI18N |
178 | 182 | jTextFieldReceiverPort.setInputVerifier(new PortNumberInputVerifier()); |
179 | 183 | jTextFieldReceiverPort.setMinimumSize(new java.awt.Dimension(44, 19)); |
184 | + jTextFieldReceiverPort.addActionListener(new java.awt.event.ActionListener() { | |
185 | + public void actionPerformed(java.awt.event.ActionEvent evt) { | |
186 | + jTextFieldReceiverPortActionPerformed(evt); | |
187 | + } | |
188 | + }); | |
180 | 189 | |
181 | 190 | jTextFieldServerHost.setText(bundle.getString("ApplicationUI.jTextFieldServerHost.text")); // NOI18N |
182 | 191 | jTextFieldServerHost.setToolTipText(bundle.getString("ApplicationUI.jTextFieldServerHost.toolTipText")); // NOI18N |
@@ -200,6 +209,14 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
200 | 209 | ); |
201 | 210 | jTextFieldConfirmTimeout.setMinimumSize(new java.awt.Dimension(1, 19)); |
202 | 211 | |
212 | + jCheckBoxServerSSL.setText(bundle.getString("ApplicationUI.jCheckBoxServerSSL.text")); // NOI18N | |
213 | + jCheckBoxServerSSL.setToolTipText(bundle.getString("ApplicationUI.jCheckBoxServerSSL.toolTipText")); // NOI18N | |
214 | + jCheckBoxServerSSL.addChangeListener(new javax.swing.event.ChangeListener() { | |
215 | + public void stateChanged(javax.swing.event.ChangeEvent evt) { | |
216 | + jCheckBoxServerSSLStateChanged(evt); | |
217 | + } | |
218 | + }); | |
219 | + | |
203 | 220 | org.jdesktop.layout.GroupLayout jPanelMailLayout = new org.jdesktop.layout.GroupLayout(jPanelMail); |
204 | 221 | jPanelMail.setLayout(jPanelMailLayout); |
205 | 222 | jPanelMailLayout.setHorizontalGroup( |
@@ -208,26 +225,28 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
208 | 225 | .addContainerGap() |
209 | 226 | .add(jPanelMailLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
210 | 227 | .add(jPanelMailLayout.createSequentialGroup() |
211 | - .add(jLabel1) | |
212 | - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) | |
213 | - .add(jTextFieldReceiverPort, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 51, Short.MAX_VALUE) | |
214 | - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) | |
228 | + .add(jPanelMailLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) | |
229 | + .add(jPanelMailLayout.createSequentialGroup() | |
230 | + .add(jLabel7) | |
231 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) | |
232 | + .add(jTextFieldConfirmTimeout, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) | |
233 | + .add(jPanelMailLayout.createSequentialGroup() | |
234 | + .add(jLabel1) | |
235 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) | |
236 | + .add(jTextFieldReceiverPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 47, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) | |
237 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 77, Short.MAX_VALUE) | |
215 | 238 | .add(jCheckBoxEnableRemoteConnect, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 207, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) |
216 | 239 | .add(jPanelMailLayout.createSequentialGroup() |
217 | - .add(jLabel7) | |
218 | - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) | |
219 | - .add(jTextFieldConfirmTimeout, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE) | |
220 | - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) | |
221 | - .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanelMailLayout.createSequentialGroup() | |
222 | 240 | .add(jLabel2) |
223 | 241 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
224 | - .add(jTextFieldServerHost, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE) | |
242 | + .add(jTextFieldServerHost, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE) | |
225 | 243 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
226 | 244 | .add(jLabel3) |
227 | 245 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
228 | - .add(jTextFieldServerPort, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE) | |
229 | - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))) | |
230 | - .addContainerGap()) | |
246 | + .add(jTextFieldServerPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 49, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) | |
247 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) | |
248 | + .add(jCheckBoxServerSSL) | |
249 | + .addContainerGap()))) | |
231 | 250 | ); |
232 | 251 | |
233 | 252 | jPanelMailLayout.linkSize(new java.awt.Component[] {jLabel1, jLabel2}, org.jdesktop.layout.GroupLayout.HORIZONTAL); |
@@ -244,14 +263,16 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
244 | 263 | .add(jPanelMailLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) |
245 | 264 | .add(jLabel2) |
246 | 265 | .add(jTextFieldServerHost, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) |
247 | - .add(jLabel3) | |
248 | - .add(jTextFieldServerPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) | |
249 | - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 27, Short.MAX_VALUE) | |
266 | + .add(jCheckBoxServerSSL) | |
267 | + .add(jTextFieldServerPort, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) | |
268 | + .add(jLabel3)) | |
269 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 25, Short.MAX_VALUE) | |
250 | 270 | .add(jPanelMailLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) |
251 | 271 | .add(jLabel7) |
252 | 272 | .add(jTextFieldConfirmTimeout, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) |
253 | 273 | .addContainerGap()) |
254 | 274 | ); |
275 | + | |
255 | 276 | jTabbedPane.addTab(bundle.getString("ApplicationUI.jPanelMail.TabConstraints.tabTitle"), null, jPanelMail, bundle.getString("ApplicationUI.jPanelMail.TabConstraints tabToolTip")); // NOI18N |
256 | 277 | |
257 | 278 | jCheckBoxLdap.setText(bundle.getString("ApplicationUI.jCheckBoxLdap.text")); // NOI18N |
@@ -302,10 +323,10 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
302 | 323 | .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel4)) |
303 | 324 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
304 | 325 | .add(jPanelLDAPLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
305 | - .add(jTextFieldAttribute, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE) | |
306 | - .add(jTextFieldBaseDn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE) | |
326 | + .add(jTextFieldAttribute, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 353, Short.MAX_VALUE) | |
327 | + .add(jTextFieldBaseDn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 353, Short.MAX_VALUE) | |
307 | 328 | .add(jPanelLDAPLayout.createSequentialGroup() |
308 | - .add(jTextFieldProviderUrl, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE) | |
329 | + .add(jTextFieldProviderUrl, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 261, Short.MAX_VALUE) | |
309 | 330 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
310 | 331 | .add(jCheckBoxIsSjis)))) |
311 | 332 | .add(jPanelLDAPLayout.createSequentialGroup() |
@@ -336,6 +357,7 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
336 | 357 | .add(jTextFieldAttribute, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) |
337 | 358 | .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) |
338 | 359 | ); |
360 | + | |
339 | 361 | jTabbedPane.addTab(bundle.getString("ApplicationUI.jPanelLDAP.TabConstraints.tabTitle"), null, jPanelLDAP, bundle.getString("ApplicationUI.jPanelLDAP.TabConstraints tabToolTip")); // NOI18N |
340 | 362 | |
341 | 363 | jLabelProgramName.setFont(new java.awt.Font("Dialog", 1, 18)); |
@@ -361,7 +383,7 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
361 | 383 | .add(jPanelAboutLayout.createSequentialGroup() |
362 | 384 | .add(55, 55, 55) |
363 | 385 | .add(jLabelSfURL))) |
364 | - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) | |
386 | + .addContainerGap(38, Short.MAX_VALUE)) | |
365 | 387 | ); |
366 | 388 | jPanelAboutLayout.setVerticalGroup( |
367 | 389 | jPanelAboutLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) |
@@ -374,6 +396,7 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
374 | 396 | .add(jLabelSfURL) |
375 | 397 | .addContainerGap(57, Short.MAX_VALUE)) |
376 | 398 | ); |
399 | + | |
377 | 400 | jTabbedPane.addTab(bundle.getString("ApplicationUI.jPanelAbout.TabConstraints.tabTitle"), null, jPanelAbout, bundle.getString("ApplicationUI.jPanelAbout.TabConstraints tabToolTip")); // NOI18N |
378 | 401 | |
379 | 402 | jButtonOK.setText(bundle.getString("ApplicationUI.jButtonOK.text")); // NOI18N |
@@ -407,12 +430,12 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
407 | 430 | .add(layout.createSequentialGroup() |
408 | 431 | .addContainerGap() |
409 | 432 | .add(jButtonQuit) |
410 | - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 133, Short.MAX_VALUE) | |
433 | + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 190, Short.MAX_VALUE) | |
411 | 434 | .add(jButtonOK) |
412 | 435 | .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) |
413 | 436 | .add(jButtonCancel) |
414 | 437 | .addContainerGap()) |
415 | - .add(jTabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE) | |
438 | + .add(jTabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 463, Short.MAX_VALUE) | |
416 | 439 | ); |
417 | 440 | |
418 | 441 | layout.linkSize(new java.awt.Component[] {jButtonCancel, jButtonOK, jButtonQuit}, org.jdesktop.layout.GroupLayout.HORIZONTAL); |
@@ -428,6 +451,7 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
428 | 451 | .add(jButtonOK)) |
429 | 452 | .addContainerGap()) |
430 | 453 | ); |
454 | + | |
431 | 455 | pack(); |
432 | 456 | }// </editor-fold>//GEN-END:initComponents |
433 | 457 |
@@ -449,6 +473,8 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
449 | 473 | jTextFieldReceiverPort.setBackground(Color.PINK); |
450 | 474 | throw ex; |
451 | 475 | } |
476 | + boolean enableRemoteConnect = jCheckBoxEnableRemoteConnect.isSelected(); | |
477 | + | |
452 | 478 | String serverHost = jTextFieldServerHost.getText(); |
453 | 479 | int serverPort; |
454 | 480 | try { |
@@ -458,7 +484,8 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
458 | 484 | jTextFieldServerPort.setBackground(Color.PINK); |
459 | 485 | throw ex; |
460 | 486 | } |
461 | - boolean enableRemoteConnect = jCheckBoxEnableRemoteConnect.isSelected(); | |
487 | + boolean serverSSL = jCheckBoxServerSSL.isSelected(); | |
488 | + | |
462 | 489 | int confirmTimeout; |
463 | 490 | try { |
464 | 491 | confirmTimeout = Integer.parseInt(jTextFieldConfirmTimeout.getText()); |
@@ -475,11 +502,11 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
475 | 502 | boolean isSjis = jCheckBoxIsSjis.isSelected(); |
476 | 503 | |
477 | 504 | if ( port != ApplicationProperties.getSmtpPort() |
505 | + || enableRemoteConnect != ApplicationProperties.getSmtpEnebleRemoteConnect() | |
478 | 506 | || !serverHost.equals(ApplicationProperties.getSmtpServerHost()) |
479 | 507 | || serverPort != ApplicationProperties.getSmtpServerPort() |
480 | - || enableRemoteConnect != ApplicationProperties.getSmtpEnebleRemoteConnect() | |
481 | - || confirmTimeout != ApplicationProperties.getConfirmTimeout() | |
482 | - | |
508 | + || serverSSL != ApplicationProperties.getSmtpServerSSL() | |
509 | + || confirmTimeout != ApplicationProperties.getConfirmTimeout() | |
483 | 510 | || enableLdap != ApplicationProperties.getLdap() |
484 | 511 | || !ldapUrl.equals(ApplicationProperties.getLdapProviderURL()) |
485 | 512 | || !rootDn.equals(ApplicationProperties.getLdapRoot()) |
@@ -489,9 +516,12 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
489 | 516 | ) { |
490 | 517 | // When modify data, save properries file. |
491 | 518 | ApplicationProperties.setSmtpPort(port); |
519 | + ApplicationProperties.setSmtpEnableRemoteConnect(enableRemoteConnect); | |
520 | + | |
492 | 521 | ApplicationProperties.setSmtpServerHost(serverHost); |
493 | 522 | ApplicationProperties.setSmtpServerPort(serverPort); |
494 | - ApplicationProperties.setSmtpEnableRemoteConnect(enableRemoteConnect); | |
523 | + ApplicationProperties.setSmtpServerSSL(serverSSL); | |
524 | + | |
495 | 525 | ApplicationProperties.setConfirmTimeout(confirmTimeout); |
496 | 526 | |
497 | 527 | ApplicationProperties.setLdap(enableLdap); |
@@ -551,6 +581,21 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
551 | 581 | } |
552 | 582 | iconified(); |
553 | 583 | }//GEN-LAST:event_jButtonCancelActionPerformed |
584 | + | |
585 | + private void jCheckBoxServerSSLStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jCheckBoxServerSSLStateChanged | |
586 | + // takuya-o | |
587 | + boolean check = jCheckBoxServerSSL.isSelected(); | |
588 | + // smtp(port 25) and ssmpt(port 465) switch. cf. TLS/STARTTLS port 587 | |
589 | + if ( check == true && jTextFieldServerPort.getText().equals("25") ) { | |
590 | + jTextFieldServerPort.setText("465"); | |
591 | + }else if ( check == false && jTextFieldServerPort.getText().equals("465") ) { | |
592 | + jTextFieldServerPort.setText("25"); | |
593 | + } | |
594 | + }//GEN-LAST:event_jCheckBoxServerSSLStateChanged | |
595 | + | |
596 | + private void jTextFieldReceiverPortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldReceiverPortActionPerformed | |
597 | + // TODO add your handling code here: | |
598 | + }//GEN-LAST:event_jTextFieldReceiverPortActionPerformed | |
554 | 599 | |
555 | 600 | private boolean isModifiedPotition() { |
556 | 601 | int x = 0; |
@@ -720,6 +765,7 @@ public class ApplicationUI extends javax.swing.JFrame { | ||
720 | 765 | private javax.swing.JCheckBox jCheckBoxEnableRemoteConnect; |
721 | 766 | private javax.swing.JCheckBox jCheckBoxIsSjis; |
722 | 767 | private javax.swing.JCheckBox jCheckBoxLdap; |
768 | + private javax.swing.JCheckBox jCheckBoxServerSSL; | |
723 | 769 | private javax.swing.JLabel jLabel1; |
724 | 770 | private javax.swing.JLabel jLabel2; |
725 | 771 | private javax.swing.JLabel jLabel3; |
@@ -21,6 +21,8 @@ ApplicationUI.jPanelLDAP.TabConstraints.tabTitle=LDAP | ||
21 | 21 | ApplicationUI.jTextFieldServerPort.toolTipText=Mail server port number. |
22 | 22 | |
23 | 23 | ApplicationUI.jTextFieldServerPort.text=25 |
24 | +ApplicationUI.jCheckBoxServerSSL.text=SSL | |
25 | +ApplicationUI.jCheckBoxServerSSL.toolTipText=Use SSL on mail server connection. | |
24 | 26 | |
25 | 27 | ApplicationUI.jLabel6.text=Attribute\: |
26 | 28 |
@@ -1,130 +1,132 @@ | ||
1 | 1 | # Sample ResourceBundle properties file |
2 | 2 | |
3 | -ApplicationUI.jPanelMail.TabConstraints.tabTitle=\u30E1\u30FC\u30EB | |
3 | +ApplicationUI.jPanelMail.TabConstraints.tabTitle=\u30e1\u30fc\u30eb | |
4 | 4 | |
5 | -ApplicationUI.jCheckBoxLdap.toolTipText=\u30C1\u30A7\u30C3\u30AF\u3059\u308B\u3068LDAP\u306E\u8A2D\u5B9A\u304C\u6709\u52B9\u306B\u306A\u308B\u3002 | |
5 | +ApplicationUI.jCheckBoxLdap.toolTipText=\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3068LDAP\u306e\u8a2d\u5b9a\u304c\u6709\u52b9\u306b\u306a\u308b\u3002 | |
6 | 6 | |
7 | -ApplicationUI.jCheckBoxLdap.text=LDAP\u691C\u7D22 | |
7 | +ApplicationUI.jCheckBoxLdap.text=LDAP\u691c\u7d22 | |
8 | 8 | |
9 | -ApplicationUI.jTextFieldServerHost.toolTipText=\u30E1\u30FC\u30EB\u30B5\u30FC\u30D0\u306E\u30DB\u30B9\u30C8\u540D\u304BIP\u30A2\u30C9\u30EC\u30B9 | |
9 | +ApplicationUI.jTextFieldServerHost.toolTipText=\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u306e\u30db\u30b9\u30c8\u540d\u304bIP\u30a2\u30c9\u30ec\u30b9 | |
10 | 10 | |
11 | 11 | ApplicationUI.jTextFieldServerHost.text=mail |
12 | 12 | |
13 | -ApplicationUI.jCheckBoxIsSjis.toolTipText=\u30C1\u30A7\u30C3\u30AF\u3059\u308B\u3068\u5F37\u5236\u7684\u306BLDAP\u30B5\u30FC\u30D0\u3068\u306E\u901A\u4FE1\u3092Shift JIS\u3067\u884C\u3046\u3002 | |
13 | +ApplicationUI.jCheckBoxIsSjis.toolTipText=\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3068\u5f37\u5236\u7684\u306bLDAP\u30b5\u30fc\u30d0\u3068\u306e\u901a\u4fe1\u3092Shift JIS\u3067\u884c\u3046\u3002 | |
14 | 14 | |
15 | -ApplicationUI.jCheckBoxIsSjis.text=SJIS\u3067\u901A\u4FE1 | |
15 | +ApplicationUI.jCheckBoxIsSjis.text=SJIS\u3067\u901a\u4fe1 | |
16 | 16 | |
17 | -ApplicationUI.jLabel1.text=\u53D7\u4FE1\u30DD\u30FC\u30C8\: | |
17 | +ApplicationUI.jLabel1.text=\u53d7\u4fe1\u30dd\u30fc\u30c8\: | |
18 | 18 | |
19 | 19 | ApplicationUI.jPanelLDAP.TabConstraints.tabTitle=LDAP |
20 | 20 | |
21 | -ApplicationUI.jTextFieldServerPort.toolTipText=\u30E1\u30FC\u30EB\u30B5\u30FC\u30D0\u306E\u30DD\u30FC\u30C8\u756A\u53F7 | |
21 | +ApplicationUI.jTextFieldServerPort.toolTipText=\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u306e\u30dd\u30fc\u30c8\u756a\u53f7 | |
22 | 22 | ApplicationUI.jTextFieldServerPort.text=25 |
23 | 23 | |
24 | -ApplicationUI.jLabel6.text=LDAP\u5C5E\u6027\: | |
24 | +ApplicationUI.jLabel6.text=LDAP\u5c5e\u6027\: | |
25 | 25 | |
26 | -ApplicationUI.jButtonQuit.text=\u7D42\u4E86 | |
26 | +ApplicationUI.jButtonQuit.text=\u7d42\u4e86 | |
27 | 27 | |
28 | 28 | ApplicationUI.jLabel4.text=URL\: |
29 | 29 | |
30 | -ApplicationUI.jTextFieldProviderUrl.toolTipText=LDAP\u30B5\u30FC\u30D0\u306EURL | |
30 | +ApplicationUI.jTextFieldProviderUrl.toolTipText=LDAP\u30b5\u30fc\u30d0\u306eURL | |
31 | 31 | |
32 | 32 | ApplicationUI.jTextFieldProviderUrl.text=ldap\://localhost\:389/ |
33 | 33 | |
34 | -ApplicationUI.jLabel2.text=\u30E1\u30FC\u30EB\u30B5\u30FC\u30D0\: | |
34 | +ApplicationUI.jLabel2.text=\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\: | |
35 | 35 | |
36 | -ApplicationUI.jCheckBoxEnableRemoteConnect.toolTipText=\u30C1\u30A7\u30C3\u30AF\u3059\u308B\u3068\u30EA\u30E2\u30FC\u30C8\u304B\u3089\u306E\u63A5\u7D9A\u3092\u8A31\u53EF\u3059\u308B\u3002(\u901A\u5E38\u306F\u30C1\u30A7\u30C3\u30AF\u3057\u306A\u3044) | |
36 | +ApplicationUI.jCheckBoxEnableRemoteConnect.toolTipText=\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3068\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u306e\u63a5\u7d9a\u3092\u8a31\u53ef\u3059\u308b\u3002(\u901a\u5e38\u306f\u30c1\u30a7\u30c3\u30af\u3057\u306a\u3044) | |
37 | 37 | |
38 | -ApplicationUI.jCheckBoxEnableRemoteConnect.text=\u30EA\u30E2\u30FC\u30C8\u63A5\u7D9A\u8A31\u53EF | |
38 | +ApplicationUI.jCheckBoxEnableRemoteConnect.text=\u30ea\u30e2\u30fc\u30c8\u63a5\u7d9a\u8a31\u53ef | |
39 | 39 | |
40 | -ApplicationUI.jButtonCancel.text=\u4E2D\u6B62 | |
40 | +ApplicationUI.jButtonCancel.text=\u4e2d\u6b62 | |
41 | 41 | |
42 | -ApplicationUI.jLabel3.text=\u30DD\u30FC\u30C8\: | |
42 | +ApplicationUI.jLabel3.text=\u30dd\u30fc\u30c8\: | |
43 | 43 | |
44 | -ApplicationUI.title=\u30E1\u30FC\u30EB\u9001\u4FE1\u5148\u78BA\u8A8D\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30D7\u30ED\u30D1\u30C6\u30A3 | |
44 | +ApplicationUI.title=\u30e1\u30fc\u30eb\u9001\u4fe1\u5148\u78ba\u8a8d\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30d7\u30ed\u30d1\u30c6\u30a3 | |
45 | 45 | |
46 | 46 | ApplicationUI.jLabel5.text=Root DN\: |
47 | 47 | |
48 | -ApplicationUI.jTextFieldBaseDn.toolTipText=LDAP\u3067\u691C\u7D22\u3092\u958B\u59CB\u3059\u308BDN | |
48 | +ApplicationUI.jTextFieldBaseDn.toolTipText=LDAP\u3067\u691c\u7d22\u3092\u958b\u59cb\u3059\u308bDN | |
49 | 49 | |
50 | 50 | ApplicationUI.jTextFieldBaseDn.text=C\=JP |
51 | 51 | |
52 | 52 | ApplicationUI.jButtonOK.text=OK |
53 | 53 | |
54 | -ApplicationUI.jTextFieldAttribute.toolTipText=\u8868\u793A\u3059\u308BLDAP\u5C5E\u6027 \u4F8B\: cn title;lang-ja-jp | |
54 | +ApplicationUI.jTextFieldAttribute.toolTipText=\u8868\u793a\u3059\u308bLDAP\u5c5e\u6027 \u4f8b\: cn title;lang-ja-jp | |
55 | 55 | |
56 | 56 | ApplicationUI.jTextFieldAttribute.text=cn |
57 | 57 | |
58 | -ApplicationUI.jTextFieldReceiverPort.toolTipText=\u30E1\u30FC\u30EB\u9001\u4FE1\u5148\u78BA\u8A8D\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u5F85\u3061\u3046\u3051\u3059\u308B\u30DD\u30FC\u30C8\u756A\u53F7 | |
58 | +ApplicationUI.jTextFieldReceiverPort.toolTipText=\u30e1\u30fc\u30eb\u9001\u4fe1\u5148\u78ba\u8a8d\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u5f85\u3061\u3046\u3051\u3059\u308b\u30dd\u30fc\u30c8\u756a\u53f7 | |
59 | 59 | ApplicationUI.jTextFieldReceiverPort.text=8725 |
60 | 60 | |
61 | -MessageDialogUI.jButtonDetail.text=\u8A73\u7D30<< | |
61 | +MessageDialogUI.jButtonDetail.text=\u8a73\u7d30<< | |
62 | 62 | |
63 | -ToListUI.title=\u30E1\u30FC\u30EB\u9001\u4FE1\u5148\u78BA\u8A8D | |
63 | +ToListUI.title=\u30e1\u30fc\u30eb\u9001\u4fe1\u5148\u78ba\u8a8d | |
64 | 64 | |
65 | -ToListUI.jButtonCancel.text=\u4E2D\u6B62 | |
65 | +ToListUI.jButtonCancel.text=\u4e2d\u6b62 | |
66 | 66 | |
67 | -ToListUI.jButtonOK.text=\u9001\u4FE1 | |
67 | +ToListUI.jButtonOK.text=\u9001\u4fe1 | |
68 | 68 | |
69 | -MessageDialogUI.jButtonOK.text=\u9589\u3058\u308B | |
69 | +MessageDialogUI.jButtonOK.text=\u9589\u3058\u308b | |
70 | 70 | |
71 | -MessageDialogUI.jButtonDetail.text.open=\u8A73\u7D30>> | |
71 | +MessageDialogUI.jButtonDetail.text.open=\u8a73\u7d30>> | |
72 | 72 | |
73 | -MessageDialogUI.title.Error_mdc=\u30A8\u30E9\u30FC \u30E1\u30FC\u30EB\u9001\u4FE1\u5148\u78BA\u8A8D\u30D7\u30ED\u30B0\u30E9\u30E0 | |
73 | +MessageDialogUI.title.Error_mdc=\u30a8\u30e9\u30fc \u30e1\u30fc\u30eb\u9001\u4fe1\u5148\u78ba\u8a8d\u30d7\u30ed\u30b0\u30e9\u30e0 | |
74 | 74 | |
75 | -MessageDialogUI.title.Information_mdc=\u60C5\u5831 \u30E1\u30FC\u30EB\u9001\u4FE1\u5148\u78BA\u8A8D\u30D7\u30ED\u30B0\u30E9\u30E0 | |
75 | +MessageDialogUI.title.Information_mdc=\u60c5\u5831 \u30e1\u30fc\u30eb\u9001\u4fe1\u5148\u78ba\u8a8d\u30d7\u30ed\u30b0\u30e9\u30e0 | |
76 | 76 | |
77 | -MessageDialogUI.title.Warning_mdc=\u8B66\u544A \u30E1\u30FC\u30EB\u9001\u4FE1\u5148\u30D7\u30ED\u30B0\u30E9\u30E0 | |
78 | -ApplicationUI.jButtonQuit.toolTipText=\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u7D42\u4E86\u3057\u307E\u3059\u3002 | |
77 | +MessageDialogUI.title.Warning_mdc=\u8b66\u544a \u30e1\u30fc\u30eb\u9001\u4fe1\u5148\u30d7\u30ed\u30b0\u30e9\u30e0 | |
78 | +ApplicationUI.jButtonQuit.toolTipText=\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d42\u4e86\u3057\u307e\u3059\u3002 | |
79 | 79 | |
80 | -ApplicationUI.jButtonOK.toolTipText=\u8A2D\u5B9A\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002 | |
80 | +ApplicationUI.jButtonOK.toolTipText=\u8a2d\u5b9a\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002 | |
81 | 81 | |
82 | -ApplicationUI.jButtonCancel.toolTipText=\u4ECA\u56DE\u306E\u8A2D\u5B9A\u3092\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3059\u3002 | |
82 | +ApplicationUI.jButtonCancel.toolTipText=\u4eca\u56de\u306e\u8a2d\u5b9a\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3057\u307e\u3059\u3002 | |
83 | 83 | |
84 | -ApplicationUI.jLabelProgramName.text=\u30E1\u30FC\u30EB\u9001\u4FE1\u5148\u78BA\u8A8D\u30D7\u30ED\u30B0\u30E9\u30E0 | |
84 | +ApplicationUI.jLabelProgramName.text=\u30e1\u30fc\u30eb\u9001\u4fe1\u5148\u78ba\u8a8d\u30d7\u30ed\u30b0\u30e9\u30e0 | |
85 | 85 | |
86 | -ApplicationUI.jPanelAbout.TabConstraints.tabTitle=\u60C5\u5831 | |
86 | +ApplicationUI.jPanelAbout.TabConstraints.tabTitle=\u60c5\u5831 | |
87 | 87 | |
88 | -ApplicationUI.Port_number_is_integer_from_1_to_65535.=\u30DD\u30FC\u30C8\u756A\u53F7\u306F1\u301C65535\u307E\u3067\u3067\u3059\u3002 | |
88 | +ApplicationUI.Port_number_is_integer_from_1_to_65535.=\u30dd\u30fc\u30c8\u756a\u53f7\u306f1\u301c65535\u307e\u3067\u3067\u3059\u3002 | |
89 | 89 | |
90 | -ApplicationUI.error.Fail_the_properties_file_save.=\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u30D5\u30A1\u30A4\u30EB\u306B\u4FDD\u5B58\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002 | |
90 | +ApplicationUI.error.Fail_the_properties_file_save.=\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 | |
91 | 91 | |
92 | -ApplicationUI.error.Out_of_range.=\u7BC4\u56F2\u304C\u4E0D\u6B63\u3067\u3059\u3002 | |
92 | +ApplicationUI.error.Out_of_range.=\u7bc4\u56f2\u304c\u4e0d\u6b63\u3067\u3059\u3002 | |
93 | 93 | |
94 | -ApplicationUI.shortTitle=\u30E1\u30FC\u30EB\u9001\u4FE1\u5148\u78BA\u8A8D\u30D7\u30ED\u30B0\u30E9\u30E0 | |
94 | +ApplicationUI.shortTitle=\u30e1\u30fc\u30eb\u9001\u4fe1\u5148\u78ba\u8a8d\u30d7\u30ed\u30b0\u30e9\u30e0 | |
95 | 95 | |
96 | -ToListUI.error.Fail_the_properties_file_of_dialog_potition_save.=\u30C0\u30A4\u30A2\u30ED\u30B0\u306E\u4F4D\u7F6E\u306E\u4FDD\u5B58\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 | |
96 | +ToListUI.error.Fail_the_properties_file_of_dialog_potition_save.=\u30c0\u30a4\u30a2\u30ed\u30b0\u306e\u4f4d\u7f6e\u306e\u4fdd\u5b58\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 | |
97 | 97 | |
98 | -LDAPSearch.error.LDAPSearch_init_error.=LDAP\u691C\u7D22\u306E\u521D\u671F\u5316\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 | |
98 | +LDAPSearch.error.LDAPSearch_init_error.=LDAP\u691c\u7d22\u306e\u521d\u671f\u5316\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 | |
99 | 99 | |
100 | -LDAPSearch.error.LDAP_Search_Error.=LDAP\u691C\u7D22\u3067\u30A8\u30E9\u30FC | |
100 | +LDAPSearch.error.LDAP_Search_Error.=LDAP\u691c\u7d22\u3067\u30a8\u30e9\u30fc | |
101 | 101 | |
102 | -LDAPSearch.error.LDAP_Unexpected_Error.=LDAP\u3067\u4E88\u60F3\u5916\u306E\u30A8\u30E9\u30FC | |
102 | +LDAPSearch.error.LDAP_Unexpected_Error.=LDAP\u3067\u4e88\u60f3\u5916\u306e\u30a8\u30e9\u30fc | |
103 | 103 | |
104 | -Processer.error.Execption_occurred_at_starting_SMTP_thread.=\u30E1\u30FC\u30EB\u30B5\u30FC\u30D0\u3068\u306ESMTP\u901A\u4FE1\u306E\u521D\u671F\u5316\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 | |
104 | +Processer.error.Execption_occurred_at_starting_SMTP_thread.=\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u3068\u306eSMTP\u901a\u4fe1\u306e\u521d\u671f\u5316\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 | |
105 | 105 | |
106 | -Processer.error.Runtime_Exception_occurred_in_SMTP_parse=\u30E1\u30FC\u30EB\u30B5\u30FC\u30D0\u3068\u306ESMTP\u901A\u4FE1\u4E2D\u306B\u5B9F\u884C\u6642\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 | |
106 | +Processer.error.Runtime_Exception_occurred_in_SMTP_parse=\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u3068\u306eSMTP\u901a\u4fe1\u4e2d\u306b\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 | |
107 | 107 | |
108 | -Processer.error.Error_occurred_in_SMTP_parse.=\u30E1\u30FC\u30EB\u30B5\u30FC\u30D0\u3068\u306ESMTP\u901A\u4FE1\u3067\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 | |
108 | +Processer.error.Error_occurred_in_SMTP_parse.=\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u3068\u306eSMTP\u901a\u4fe1\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 | |
109 | 109 | |
110 | -SMTPClient.error.Recive_Port_bind_error=\u53D7\u4FE1\u7528\u306E\u30DD\u30FC\u30C8\u306E\u521D\u671F\u5316(bind)\u306B\u5931\u6557\u3057\u305F\u306E\u3067\u53D7\u4FE1\u304C\u505C\u6B62\u3057\u307E\u3057\u305F\u3002 | |
110 | +SMTPClient.error.Recive_Port_bind_error=\u53d7\u4fe1\u7528\u306e\u30dd\u30fc\u30c8\u306e\u521d\u671f\u5316(bind)\u306b\u5931\u6557\u3057\u305f\u306e\u3067\u53d7\u4fe1\u304c\u505c\u6b62\u3057\u307e\u3057\u305f\u3002 | |
111 | 111 | |
112 | -SMTPClient.error.IO_Error_Occurred=\u53D7\u4FE1\u5F85\u3067\u901A\u4FE1\u30A8\u30E9\u30FC\u306B\u3088\u308A\u53D7\u4FE1\u304C\u505C\u6B62\u3057\u307E\u3057\u305F\u3002 | |
112 | +SMTPClient.error.IO_Error_Occurred=\u53d7\u4fe1\u5f85\u3067\u901a\u4fe1\u30a8\u30e9\u30fc\u306b\u3088\u308a\u53d7\u4fe1\u304c\u505c\u6b62\u3057\u307e\u3057\u305f\u3002 | |
113 | 113 | |
114 | -SMTPClient.error.Argument_Error_Occurted=\u8A2D\u5B9A\u5024\u304C\u6B63\u3057\u304F\u306A\u3044\u305F\u3081\u306B\u53D7\u4FE1\u304C\u3067\u304D\u3066\u3044\u307E\u305B\u3093\u3002\u8A2D\u5B9A\u3092\u5909\u3048\u3066\u307F\u3066\u304F\u3060\u3055\u3044\u3002 | |
114 | +SMTPClient.error.Argument_Error_Occurted=\u8a2d\u5b9a\u5024\u304c\u6b63\u3057\u304f\u306a\u3044\u305f\u3081\u306b\u53d7\u4fe1\u304c\u3067\u304d\u3066\u3044\u307e\u305b\u3093\u3002\u8a2d\u5b9a\u3092\u5909\u3048\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002 | |
115 | 115 | |
116 | -SMTPCLient.error.Runtime_Exception_was_occurred=\u5B9F\u884C\u6642\u30A8\u30E9\u30FC\u306B\u3088\u308A\u53D7\u4FE1\u3092\u505C\u6B62\u3057\u307E\u3057\u305F\u3002\u8A2D\u5B9A\u3092\u5909\u3048\u3066\u307F\u3066\u304F\u3060\u3055\u3044\u3002 | |
116 | +SMTPCLient.error.Runtime_Exception_was_occurred=\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\u306b\u3088\u308a\u53d7\u4fe1\u3092\u505c\u6b62\u3057\u307e\u3057\u305f\u3002\u8a2d\u5b9a\u3092\u5909\u3048\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002 | |
117 | 117 | |
118 | -SMTPClient.error.Unexpected_service_stoping_ocurreed=\u4E88\u60F3\u5916\u306E\u30A8\u30E9\u30FC\u306B\u3088\u308A\u53D7\u4FE1\u3092\u505C\u6B62\u3057\u307E\u3057\u305F\u3002 | |
118 | +SMTPClient.error.Unexpected_service_stoping_ocurreed=\u4e88\u60f3\u5916\u306e\u30a8\u30e9\u30fc\u306b\u3088\u308a\u53d7\u4fe1\u3092\u505c\u6b62\u3057\u307e\u3057\u305f\u3002 | |
119 | 119 | |
120 | -ApplicationUI.jLabel7.text=\u6642\u9650\u5F0F\u9001\u4FE1\u78BA\u8A8D\u5F85\u3061\u6642\u9593\: | |
120 | +ApplicationUI.jLabel7.text=\u6642\u9650\u5f0f\u9001\u4fe1\u78ba\u8a8d\u5f85\u3061\u6642\u9593\: | |
121 | 121 | |
122 | -ApplicationUI.jTextFieldConfirmTimeout.toolTipText=\u9001\u4FE1\u78BA\u8A8D\u3092\u5F85\u3064\u79D2\u6570\u3002\u3053\u306E\u79D2\u6570\u3092\u904E\u304E\u308B\u3068\u81EA\u52D5\u7684\u306B\u9001\u4FE1\u3057\u307E\u3059\u3002(0\:\u6C38\u4E45\u5F85\u3061) | |
122 | +ApplicationUI.jTextFieldConfirmTimeout.toolTipText=\u9001\u4fe1\u78ba\u8a8d\u3092\u5f85\u3064\u79d2\u6570\u3002\u3053\u306e\u79d2\u6570\u3092\u904e\u304e\u308b\u3068\u81ea\u52d5\u7684\u306b\u9001\u4fe1\u3057\u307e\u3059\u3002(0\:\u6c38\u4e45\u5f85\u3061) | |
123 | 123 | |
124 | -ApplicationUI.jPanelMail.TabConstraints\ tabToolTip=\u30E1\u30FC\u30EB\u95A2\u4FC2\u306E\u8A2D\u5B9A | |
124 | +ApplicationUI.jPanelMail.TabConstraints\ tabToolTip=\u30e1\u30fc\u30eb\u95a2\u4fc2\u306e\u8a2d\u5b9a | |
125 | 125 | |
126 | -ApplicationUI.jPanelLDAP.TabConstraints\ tabToolTip=LDAP\u95A2\u4FC2\u306E\u8A2D\u5B9A | |
126 | +ApplicationUI.jPanelLDAP.TabConstraints\ tabToolTip=LDAP\u95a2\u4fc2\u306e\u8a2d\u5b9a | |
127 | 127 | |
128 | -ApplicationUI.jPanelAbout.TabConstraints\ tabToolTip=\u3053\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u3064\u3044\u3066 | |
128 | +ApplicationUI.jPanelAbout.TabConstraints\ tabToolTip=\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3064\u3044\u3066 | |
129 | 129 | |
130 | -ApplicationUI.exception.Timeout_need_to_a_positive_number=\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u5024\u306F0\u4EE5\u4E0A\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002 | |
130 | +ApplicationUI.exception.Timeout_need_to_a_positive_number=\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u5024\u306f0\u4ee5\u4e0a\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 | |
131 | +ApplicationUI.jCheckBoxServerSSL.toolTipText=\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\u3068\u306e\u63a5\u7d9a\u306bSSL\u3092\u5229\u7528\u3059\u308b\u3002 | |
132 | +ApplicationUI.jCheckBoxServerSSL.text=SSL\u6709\u52b9 |
@@ -13,10 +13,16 @@ import java.io.OutputStreamWriter; | ||
13 | 13 | import java.io.PrintWriter; |
14 | 14 | |
15 | 15 | import java.net.Socket; |
16 | +import java.security.KeyManagementException; | |
17 | +import java.security.NoSuchAlgorithmException; | |
16 | 18 | |
17 | 19 | import java.util.ArrayList; |
18 | 20 | import java.util.ListIterator; |
19 | 21 | import java.util.regex.Pattern; |
22 | +import javax.net.SocketFactory; | |
23 | +import javax.net.ssl.SSLContext; | |
24 | +import javax.net.ssl.TrustManager; | |
25 | +import org.jent.checksmtp.ssl.RespondingX509TrustManager; | |
20 | 26 | |
21 | 27 | |
22 | 28 | public class Processer implements Runnable, ResultNotify { |
@@ -83,6 +89,7 @@ public class Processer implements Runnable, ResultNotify { | ||
83 | 89 | BufferedReader clientReader; |
84 | 90 | PrintWriter clientWriter; |
85 | 91 | |
92 | + SocketFactory socketFactory = null; | |
86 | 93 | Socket server = null; |
87 | 94 | |
88 | 95 | try { |
@@ -92,8 +99,36 @@ public class Processer implements Runnable, ResultNotify { | ||
92 | 99 | //SMTP Server port |
93 | 100 | int serverport = ApplicationProperties.getSmtpServerPort(); |
94 | 101 | |
102 | + if ( ApplicationProperties.getSmtpServerSSL() ) { | |
103 | + //SMTP Server use SSL | |
104 | + System.out.println("SMTP Server use SSL."); | |
105 | + //socketFactory = SSLSocketFactory.getDefault(); | |
106 | + //OreOre server connection support TrustManager setting. | |
107 | + try { | |
108 | + SSLContext sslContext = SSLContext.getInstance("TLS"); //SSL,TLS,TLSv1.1 | |
109 | + sslContext.init(null, | |
110 | + new TrustManager[]{ new RespondingX509TrustManager() }, null); | |
111 | + socketFactory = sslContext.getSocketFactory(); | |
112 | + } catch (NoSuchAlgorithmException nsaEx ) {//from SSLContext.getDefault() | |
113 | + //TODO: Error dialog | |
114 | + nsaEx.printStackTrace(System.err); | |
115 | + } catch (KeyManagementException kmEx) {//from SSLContext.init() | |
116 | + //TODO: Error dialog | |
117 | + kmEx.printStackTrace(System.err); | |
118 | + } catch (IllegalStateException isEx) {//from SSLContext.getSocketFactory() | |
119 | + //TODO: Error dialog | |
120 | + isEx.printStackTrace(System.err); | |
121 | + } catch (Exception ex) { //for new RespondingX506TrustManager() | |
122 | + //TODO: Error dialog | |
123 | + ex.printStackTrace(System.err); | |
124 | + } | |
125 | + } else { | |
126 | + //SMTP Server is normal Socket. | |
127 | + socketFactory = SocketFactory.getDefault(); | |
128 | + } | |
129 | + | |
95 | 130 | //Connection to true SMTP server. |
96 | - server = new Socket(servername, serverport); | |
131 | + server = socketFactory.createSocket(servername, serverport); | |
97 | 132 | serverInput = server.getInputStream(); |
98 | 133 | serverOutput = server.getOutputStream(); |
99 | 134 | clientInput = client.getInputStream(); |