• R/O
  • HTTP
  • SSH
  • HTTPS

BetaProject: 提交

Mail送信先確認プログラムβプロジェクト


Commit MetaInfo

修訂0a5f98815b336a57884ec73a93dfef2b81dd5efe (tree)
時間2011-05-06 14:23:12
作者Takuya Ono <takuya-o@user...>
CommiterTakuya Ono

Log Message

Support: [ #25090 ] TLS/SSL SMTP server connection suuport. Ph.1

Change Summary

差異

--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -1,3 +1,6 @@
1+annotation.processing.enabled=true
2+annotation.processing.enabled.in.editor=false
3+annotation.processing.run.all.processors=true
14 application.args=
25 application.homepage=https://sourceforge.jp/projects/mdc
36 application.title=mdc2
@@ -29,12 +32,16 @@ file.reference.BetaProject-test=src
2932 includes=**
3033 j2ee.platform=1.4
3134 j2ee.server.type=Tomcat55
32-jar.compress=false
35+jar.archive.disabled=${jnlp.enabled}
36+jar.compress=true
37+jar.index=${jnlp.enabled}
3338 javac.classpath=\
3439 ${libs.swing-layout.classpath}
3540 # Space-separated list of extra javac options
3641 javac.compilerargs=-Xlint:unchecked -encoding UTF-8
3742 javac.deprecation=true
43+javac.processorpath=\
44+ ${javac.classpath}
3845 javac.source=1.4
3946 javac.target=1.4
4047 javac.test.classpath=\
@@ -54,7 +61,9 @@ javadoc.version=false
5461 javadoc.windowtitle=-charset UTF-8 -docencoding UTF-8
5562 jnlp.codebase.type=local
5663 jnlp.codebase.url=file:/home/mirara/tkyn/src/NetBeansTest/BetaProject/dist/
64+jnlp.descriptor=application
5765 jnlp.enabled=false
66+jnlp.mixed.code=defaut
5867 jnlp.offline-allowed=false
5968 jnlp.signed=false
6069 main.class=org.jent.checksmtp.ApplicationUI
--- a/src/org/jent/checksmtp/ApplicationProperties.java
+++ b/src/org/jent/checksmtp/ApplicationProperties.java
@@ -15,9 +15,11 @@ import java.util.Properties;
1515 * <H3>Properties</H3>
1616 * <DL>
1717 * <DT> -.port <DD>Service port number. (Default:8725)
18+ * <DT> -.ssl <DD>Service port use SSL. (Default:false) //Not use yet.
1819 * <DT> -.enableRemoteConnect <DD>Permit connect from remote host. (Default:false)
1920 * <DT> -.serverHost <DD>STMP Server host name. (Default:mail)
2021 * <DT> -.serverPort <DD>STMP Server port. (Default:25)
22+ * <DT> -.serverSSL <DD>SMTP Server port use SSL. (Default:false)
2123 * <DT> -.confirm.timeout <DD> Confirm auto push OK timeput (Default:0 = forever)
2224 * <DT> -.ladp <DD>If "true" use LDAP search. (Default:false)
2325 * <DT> -.ldap.providerUrl <DD>LDAP Provider URL (Default:ldap://localhost:389
@@ -31,9 +33,11 @@ import java.util.Properties;
3133 public class ApplicationProperties {
3234 private static final String PREFIX = "org.jent.checksmtp";
3335 private static final String SMTP_PORT = PREFIX + ".port";
36+ private static final String SMTP_SSL = PREFIX + ".SSL";
3437 private static final String SMTP_ENEBLE_REMOTE_CONNECT = PREFIX + ".enableRemoteConnect";
3538 private static final String SMTP_SERVER_HOST = PREFIX + ".serverHost";
3639 private static final String SMTP_SERVER_PORT = PREFIX + ".serverPort";
40+ private static final String SMTP_SERVER_SSL = PREFIX + ".serverSSL";
3741 private static final String CONFIRM_TIMEOUT = PREFIX + ".confirmTimeout";
3842 private static final String LDAP_PREFIX = PREFIX + ".ldap";
3943 private static final String LDAP_PROVIDER_URL = LDAP_PREFIX + ".providerUrl";
@@ -109,10 +113,19 @@ public class ApplicationProperties {
109113 public static int getSmtpServerPort() {
110114 return Integer.parseInt(applicationProperties.getProperty(SMTP_SERVER_PORT, "25"));
111115 }
112-
116+
113117 public static void setSmtpServerPort(int port) {
114118 applicationProperties.setProperty(SMTP_SERVER_PORT, new Integer(port).toString());
115119 }
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+ }
116129
117130 public static int getSmtpPort() {
118131 return Integer.parseInt(applicationProperties.getProperty(SMTP_PORT, "8725"));
@@ -121,10 +134,18 @@ public class ApplicationProperties {
121134 public static void setSmtpPort(int port) {
122135 applicationProperties.setProperty(SMTP_PORT, new Integer(port).toString());
123136 }
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+
125146 public static boolean getSmtpEnebleRemoteConnect() {
126147 String str = applicationProperties.getProperty(SMTP_ENEBLE_REMOTE_CONNECT);
127- return new Boolean(str).booleanValue();
148+ return Boolean.valueOf(str).booleanValue();
128149 }
129150
130151 public static void setSmtpEnableRemoteConnect(boolean obj) {
@@ -148,7 +169,7 @@ public class ApplicationProperties {
148169 }
149170
150171 public static boolean getLdapIsSjis() {
151- return new Boolean(applicationProperties.getProperty(LDAP_IS_SJIS)).booleanValue();
172+ return Boolean.valueOf(applicationProperties.getProperty(LDAP_IS_SJIS)).booleanValue();
152173 }
153174
154175 public static void setLdapIsSjis(boolean obj) {
@@ -157,7 +178,8 @@ public class ApplicationProperties {
157178
158179 public static boolean getLdap() {
159180 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);
161183 return flg.booleanValue();
162184 }
163185
--- a/src/org/jent/checksmtp/ApplicationUI.form
+++ b/src/org/jent/checksmtp/ApplicationUI.form
@@ -1,4 +1,4 @@
1-<?xml version="1.0" encoding="UTF-8" ?>
1+<?xml version="1.1" encoding="UTF-8" ?>
22
33 <Form version="1.4" maxVersion="1.4" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
44 <Properties>
@@ -18,6 +18,8 @@
1818 <EventHandler event="windowIconified" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowIconified"/>
1919 </Events>
2020 <AuxValues>
21+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
22+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
2123 <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
2224 <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
2325 <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
@@ -32,13 +34,13 @@
3234 <Group type="102" attributes="0">
3335 <EmptySpace max="-2" attributes="0"/>
3436 <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"/>
3638 <Component id="jButtonOK" linkSize="1" min="-2" max="-2" attributes="0"/>
3739 <EmptySpace max="-2" attributes="0"/>
3840 <Component id="jButtonCancel" linkSize="1" min="-2" max="-2" attributes="0"/>
3941 <EmptySpace max="-2" attributes="0"/>
4042 </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"/>
4244 </Group>
4345 </DimensionLayout>
4446 <DimensionLayout dim="1">
@@ -81,31 +83,35 @@
8183 <Group type="102" attributes="0">
8284 <EmptySpace min="-2" max="-2" attributes="0"/>
8385 <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"/>
89100 <Component id="jCheckBoxEnableRemoteConnect" min="-2" pref="207" max="-2" attributes="0"/>
90101 </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">
98103 <Component id="jLabel2" linkSize="2" min="-2" max="-2" attributes="0"/>
99104 <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"/>
101106 <EmptySpace min="-2" max="-2" attributes="0"/>
102107 <Component id="jLabel3" min="-2" max="-2" attributes="0"/>
103108 <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"/>
105110 <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"/>
106113 </Group>
107114 </Group>
108- <EmptySpace min="-2" max="-2" attributes="0"/>
109115 </Group>
110116 </Group>
111117 </DimensionLayout>
@@ -122,10 +128,11 @@
122128 <Group type="103" groupAlignment="3" attributes="0">
123129 <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
124130 <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"/>
125133 <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
126- <Component id="jTextFieldServerPort" alignment="3" min="-2" max="-2" attributes="0"/>
127134 </Group>
128- <EmptySpace pref="35" max="32767" attributes="0"/>
135+ <EmptySpace pref="25" max="32767" attributes="0"/>
129136 <Group type="103" groupAlignment="3" attributes="0">
130137 <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
131138 <Component id="jTextFieldConfirmTimeout" alignment="3" min="-2" max="-2" attributes="0"/>
@@ -172,6 +179,9 @@
172179 <Dimension value="[44, 19]"/>
173180 </Property>
174181 </Properties>
182+ <Events>
183+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldReceiverPortActionPerformed"/>
184+ </Events>
175185 </Component>
176186 <Component class="javax.swing.JTextField" name="jTextFieldServerHost">
177187 <Properties>
@@ -243,6 +253,19 @@
243253 </Property>
244254 </Properties>
245255 </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(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
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(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
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>
246269 </SubComponents>
247270 </Container>
248271 <Container class="javax.swing.JPanel" name="jPanelLDAP">
@@ -273,10 +296,10 @@
273296 </Group>
274297 <EmptySpace max="-2" attributes="0"/>
275298 <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"/>
278301 <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"/>
280303 <EmptySpace max="-2" attributes="0"/>
281304 <Component id="jCheckBoxIsSjis" min="-2" max="-2" attributes="0"/>
282305 </Group>
@@ -312,7 +335,7 @@
312335 <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
313336 <Component id="jTextFieldAttribute" alignment="3" min="-2" max="-2" attributes="0"/>
314337 </Group>
315- <EmptySpace pref="22" max="32767" attributes="0"/>
338+ <EmptySpace max="32767" attributes="0"/>
316339 </Group>
317340 </Group>
318341 </DimensionLayout>
@@ -444,7 +467,7 @@
444467 <Component id="jLabelSfURL" min="-2" max="-2" attributes="0"/>
445468 </Group>
446469 </Group>
447- <EmptySpace max="32767" attributes="0"/>
470+ <EmptySpace pref="38" max="32767" attributes="0"/>
448471 </Group>
449472 </Group>
450473 </DimensionLayout>
@@ -458,7 +481,7 @@
458481 </Group>
459482 <EmptySpace max="-2" attributes="0"/>
460483 <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"/>
462485 </Group>
463486 </Group>
464487 </DimensionLayout>
--- a/src/org/jent/checksmtp/ApplicationUI.java
+++ b/src/org/jent/checksmtp/ApplicationUI.java
@@ -42,9 +42,11 @@ public class ApplicationUI extends javax.swing.JFrame {
4242 }
4343
4444 private void resetDisplay() {
45+ //reset display data from ApplicationProperties.
4546 jTextFieldReceiverPort.setText(Integer.toString(ApplicationProperties.getSmtpPort()));
4647 jTextFieldServerHost.setText(ApplicationProperties.getSmtpServerHost());
4748 jTextFieldServerPort.setText(Integer.toString(ApplicationProperties.getSmtpServerPort()));
49+ jCheckBoxServerSSL.setSelected(ApplicationProperties.getSmtpServerSSL());
4850 jCheckBoxEnableRemoteConnect.setSelected(ApplicationProperties.getSmtpEnebleRemoteConnect());
4951 jTextFieldConfirmTimeout.setText(Integer.toString(ApplicationProperties.getConfirmTimeout()));
5052
@@ -124,8 +126,9 @@ public class ApplicationUI extends javax.swing.JFrame {
124126 * WARNING: Do NOT modify this code. The content of this method is
125127 * always regenerated by the Form Editor.
126128 */
127- // <editor-fold defaultstate="collapsed" desc=" Generated Code">//GEN-BEGIN:initComponents
129+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
128130 private void initComponents() {
131+
129132 jTabbedPane = new javax.swing.JTabbedPane();
130133 jPanelMail = new javax.swing.JPanel();
131134 jLabel1 = new javax.swing.JLabel();
@@ -137,6 +140,7 @@ public class ApplicationUI extends javax.swing.JFrame {
137140 jCheckBoxEnableRemoteConnect = new javax.swing.JCheckBox();
138141 jLabel7 = new javax.swing.JLabel();
139142 jTextFieldConfirmTimeout = new javax.swing.JTextField();
143+ jCheckBoxServerSSL = new javax.swing.JCheckBox();
140144 jPanelLDAP = new javax.swing.JPanel();
141145 jCheckBoxLdap = new javax.swing.JCheckBox();
142146 jLabel4 = new javax.swing.JLabel();
@@ -177,6 +181,11 @@ public class ApplicationUI extends javax.swing.JFrame {
177181 jTextFieldReceiverPort.setToolTipText(bundle.getString("ApplicationUI.jTextFieldReceiverPort.toolTipText")); // NOI18N
178182 jTextFieldReceiverPort.setInputVerifier(new PortNumberInputVerifier());
179183 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+ });
180189
181190 jTextFieldServerHost.setText(bundle.getString("ApplicationUI.jTextFieldServerHost.text")); // NOI18N
182191 jTextFieldServerHost.setToolTipText(bundle.getString("ApplicationUI.jTextFieldServerHost.toolTipText")); // NOI18N
@@ -200,6 +209,14 @@ public class ApplicationUI extends javax.swing.JFrame {
200209 );
201210 jTextFieldConfirmTimeout.setMinimumSize(new java.awt.Dimension(1, 19));
202211
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+
203220 org.jdesktop.layout.GroupLayout jPanelMailLayout = new org.jdesktop.layout.GroupLayout(jPanelMail);
204221 jPanelMail.setLayout(jPanelMailLayout);
205222 jPanelMailLayout.setHorizontalGroup(
@@ -208,26 +225,28 @@ public class ApplicationUI extends javax.swing.JFrame {
208225 .addContainerGap()
209226 .add(jPanelMailLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
210227 .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)
215238 .add(jCheckBoxEnableRemoteConnect, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 207, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
216239 .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()
222240 .add(jLabel2)
223241 .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)
225243 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
226244 .add(jLabel3)
227245 .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())))
231250 );
232251
233252 jPanelMailLayout.linkSize(new java.awt.Component[] {jLabel1, jLabel2}, org.jdesktop.layout.GroupLayout.HORIZONTAL);
@@ -244,14 +263,16 @@ public class ApplicationUI extends javax.swing.JFrame {
244263 .add(jPanelMailLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
245264 .add(jLabel2)
246265 .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)
250270 .add(jPanelMailLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
251271 .add(jLabel7)
252272 .add(jTextFieldConfirmTimeout, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
253273 .addContainerGap())
254274 );
275+
255276 jTabbedPane.addTab(bundle.getString("ApplicationUI.jPanelMail.TabConstraints.tabTitle"), null, jPanelMail, bundle.getString("ApplicationUI.jPanelMail.TabConstraints tabToolTip")); // NOI18N
256277
257278 jCheckBoxLdap.setText(bundle.getString("ApplicationUI.jCheckBoxLdap.text")); // NOI18N
@@ -302,10 +323,10 @@ public class ApplicationUI extends javax.swing.JFrame {
302323 .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel4))
303324 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
304325 .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)
307328 .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)
309330 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
310331 .add(jCheckBoxIsSjis))))
311332 .add(jPanelLDAPLayout.createSequentialGroup()
@@ -336,6 +357,7 @@ public class ApplicationUI extends javax.swing.JFrame {
336357 .add(jTextFieldAttribute, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
337358 .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
338359 );
360+
339361 jTabbedPane.addTab(bundle.getString("ApplicationUI.jPanelLDAP.TabConstraints.tabTitle"), null, jPanelLDAP, bundle.getString("ApplicationUI.jPanelLDAP.TabConstraints tabToolTip")); // NOI18N
340362
341363 jLabelProgramName.setFont(new java.awt.Font("Dialog", 1, 18));
@@ -361,7 +383,7 @@ public class ApplicationUI extends javax.swing.JFrame {
361383 .add(jPanelAboutLayout.createSequentialGroup()
362384 .add(55, 55, 55)
363385 .add(jLabelSfURL)))
364- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
386+ .addContainerGap(38, Short.MAX_VALUE))
365387 );
366388 jPanelAboutLayout.setVerticalGroup(
367389 jPanelAboutLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
@@ -374,6 +396,7 @@ public class ApplicationUI extends javax.swing.JFrame {
374396 .add(jLabelSfURL)
375397 .addContainerGap(57, Short.MAX_VALUE))
376398 );
399+
377400 jTabbedPane.addTab(bundle.getString("ApplicationUI.jPanelAbout.TabConstraints.tabTitle"), null, jPanelAbout, bundle.getString("ApplicationUI.jPanelAbout.TabConstraints tabToolTip")); // NOI18N
378401
379402 jButtonOK.setText(bundle.getString("ApplicationUI.jButtonOK.text")); // NOI18N
@@ -407,12 +430,12 @@ public class ApplicationUI extends javax.swing.JFrame {
407430 .add(layout.createSequentialGroup()
408431 .addContainerGap()
409432 .add(jButtonQuit)
410- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 133, Short.MAX_VALUE)
433+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 190, Short.MAX_VALUE)
411434 .add(jButtonOK)
412435 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
413436 .add(jButtonCancel)
414437 .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)
416439 );
417440
418441 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 {
428451 .add(jButtonOK))
429452 .addContainerGap())
430453 );
454+
431455 pack();
432456 }// </editor-fold>//GEN-END:initComponents
433457
@@ -449,6 +473,8 @@ public class ApplicationUI extends javax.swing.JFrame {
449473 jTextFieldReceiverPort.setBackground(Color.PINK);
450474 throw ex;
451475 }
476+ boolean enableRemoteConnect = jCheckBoxEnableRemoteConnect.isSelected();
477+
452478 String serverHost = jTextFieldServerHost.getText();
453479 int serverPort;
454480 try {
@@ -458,7 +484,8 @@ public class ApplicationUI extends javax.swing.JFrame {
458484 jTextFieldServerPort.setBackground(Color.PINK);
459485 throw ex;
460486 }
461- boolean enableRemoteConnect = jCheckBoxEnableRemoteConnect.isSelected();
487+ boolean serverSSL = jCheckBoxServerSSL.isSelected();
488+
462489 int confirmTimeout;
463490 try {
464491 confirmTimeout = Integer.parseInt(jTextFieldConfirmTimeout.getText());
@@ -475,11 +502,11 @@ public class ApplicationUI extends javax.swing.JFrame {
475502 boolean isSjis = jCheckBoxIsSjis.isSelected();
476503
477504 if ( port != ApplicationProperties.getSmtpPort()
505+ || enableRemoteConnect != ApplicationProperties.getSmtpEnebleRemoteConnect()
478506 || !serverHost.equals(ApplicationProperties.getSmtpServerHost())
479507 || serverPort != ApplicationProperties.getSmtpServerPort()
480- || enableRemoteConnect != ApplicationProperties.getSmtpEnebleRemoteConnect()
481- || confirmTimeout != ApplicationProperties.getConfirmTimeout()
482-
508+ || serverSSL != ApplicationProperties.getSmtpServerSSL()
509+ || confirmTimeout != ApplicationProperties.getConfirmTimeout()
483510 || enableLdap != ApplicationProperties.getLdap()
484511 || !ldapUrl.equals(ApplicationProperties.getLdapProviderURL())
485512 || !rootDn.equals(ApplicationProperties.getLdapRoot())
@@ -489,9 +516,12 @@ public class ApplicationUI extends javax.swing.JFrame {
489516 ) {
490517 // When modify data, save properries file.
491518 ApplicationProperties.setSmtpPort(port);
519+ ApplicationProperties.setSmtpEnableRemoteConnect(enableRemoteConnect);
520+
492521 ApplicationProperties.setSmtpServerHost(serverHost);
493522 ApplicationProperties.setSmtpServerPort(serverPort);
494- ApplicationProperties.setSmtpEnableRemoteConnect(enableRemoteConnect);
523+ ApplicationProperties.setSmtpServerSSL(serverSSL);
524+
495525 ApplicationProperties.setConfirmTimeout(confirmTimeout);
496526
497527 ApplicationProperties.setLdap(enableLdap);
@@ -551,6 +581,21 @@ public class ApplicationUI extends javax.swing.JFrame {
551581 }
552582 iconified();
553583 }//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
554599
555600 private boolean isModifiedPotition() {
556601 int x = 0;
@@ -720,6 +765,7 @@ public class ApplicationUI extends javax.swing.JFrame {
720765 private javax.swing.JCheckBox jCheckBoxEnableRemoteConnect;
721766 private javax.swing.JCheckBox jCheckBoxIsSjis;
722767 private javax.swing.JCheckBox jCheckBoxLdap;
768+ private javax.swing.JCheckBox jCheckBoxServerSSL;
723769 private javax.swing.JLabel jLabel1;
724770 private javax.swing.JLabel jLabel2;
725771 private javax.swing.JLabel jLabel3;
--- a/src/org/jent/checksmtp/Bundle.properties
+++ b/src/org/jent/checksmtp/Bundle.properties
@@ -21,6 +21,8 @@ ApplicationUI.jPanelLDAP.TabConstraints.tabTitle=LDAP
2121 ApplicationUI.jTextFieldServerPort.toolTipText=Mail server port number.
2222
2323 ApplicationUI.jTextFieldServerPort.text=25
24+ApplicationUI.jCheckBoxServerSSL.text=SSL
25+ApplicationUI.jCheckBoxServerSSL.toolTipText=Use SSL on mail server connection.
2426
2527 ApplicationUI.jLabel6.text=Attribute\:
2628
--- a/src/org/jent/checksmtp/Bundle_ja_JP.properties
+++ b/src/org/jent/checksmtp/Bundle_ja_JP.properties
@@ -1,130 +1,132 @@
11 # Sample ResourceBundle properties file
22
3-ApplicationUI.jPanelMail.TabConstraints.tabTitle=\u30E1\u30FC\u30EB
3+ApplicationUI.jPanelMail.TabConstraints.tabTitle=\u30e1\u30fc\u30eb
44
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
66
7-ApplicationUI.jCheckBoxLdap.text=LDAP\u691C\u7D22
7+ApplicationUI.jCheckBoxLdap.text=LDAP\u691c\u7d22
88
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
1010
1111 ApplicationUI.jTextFieldServerHost.text=mail
1212
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
1414
15-ApplicationUI.jCheckBoxIsSjis.text=SJIS\u3067\u901A\u4FE1
15+ApplicationUI.jCheckBoxIsSjis.text=SJIS\u3067\u901a\u4fe1
1616
17-ApplicationUI.jLabel1.text=\u53D7\u4FE1\u30DD\u30FC\u30C8\:
17+ApplicationUI.jLabel1.text=\u53d7\u4fe1\u30dd\u30fc\u30c8\:
1818
1919 ApplicationUI.jPanelLDAP.TabConstraints.tabTitle=LDAP
2020
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
2222 ApplicationUI.jTextFieldServerPort.text=25
2323
24-ApplicationUI.jLabel6.text=LDAP\u5C5E\u6027\:
24+ApplicationUI.jLabel6.text=LDAP\u5c5e\u6027\:
2525
26-ApplicationUI.jButtonQuit.text=\u7D42\u4E86
26+ApplicationUI.jButtonQuit.text=\u7d42\u4e86
2727
2828 ApplicationUI.jLabel4.text=URL\:
2929
30-ApplicationUI.jTextFieldProviderUrl.toolTipText=LDAP\u30B5\u30FC\u30D0\u306EURL
30+ApplicationUI.jTextFieldProviderUrl.toolTipText=LDAP\u30b5\u30fc\u30d0\u306eURL
3131
3232 ApplicationUI.jTextFieldProviderUrl.text=ldap\://localhost\:389/
3333
34-ApplicationUI.jLabel2.text=\u30E1\u30FC\u30EB\u30B5\u30FC\u30D0\:
34+ApplicationUI.jLabel2.text=\u30e1\u30fc\u30eb\u30b5\u30fc\u30d0\:
3535
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)
3737
38-ApplicationUI.jCheckBoxEnableRemoteConnect.text=\u30EA\u30E2\u30FC\u30C8\u63A5\u7D9A\u8A31\u53EF
38+ApplicationUI.jCheckBoxEnableRemoteConnect.text=\u30ea\u30e2\u30fc\u30c8\u63a5\u7d9a\u8a31\u53ef
3939
40-ApplicationUI.jButtonCancel.text=\u4E2D\u6B62
40+ApplicationUI.jButtonCancel.text=\u4e2d\u6b62
4141
42-ApplicationUI.jLabel3.text=\u30DD\u30FC\u30C8\:
42+ApplicationUI.jLabel3.text=\u30dd\u30fc\u30c8\:
4343
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
4545
4646 ApplicationUI.jLabel5.text=Root DN\:
4747
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
4949
5050 ApplicationUI.jTextFieldBaseDn.text=C\=JP
5151
5252 ApplicationUI.jButtonOK.text=OK
5353
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
5555
5656 ApplicationUI.jTextFieldAttribute.text=cn
5757
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
5959 ApplicationUI.jTextFieldReceiverPort.text=8725
6060
61-MessageDialogUI.jButtonDetail.text=\u8A73\u7D30<<
61+MessageDialogUI.jButtonDetail.text=\u8a73\u7d30<<
6262
63-ToListUI.title=\u30E1\u30FC\u30EB\u9001\u4FE1\u5148\u78BA\u8A8D
63+ToListUI.title=\u30e1\u30fc\u30eb\u9001\u4fe1\u5148\u78ba\u8a8d
6464
65-ToListUI.jButtonCancel.text=\u4E2D\u6B62
65+ToListUI.jButtonCancel.text=\u4e2d\u6b62
6666
67-ToListUI.jButtonOK.text=\u9001\u4FE1
67+ToListUI.jButtonOK.text=\u9001\u4fe1
6868
69-MessageDialogUI.jButtonOK.text=\u9589\u3058\u308B
69+MessageDialogUI.jButtonOK.text=\u9589\u3058\u308b
7070
71-MessageDialogUI.jButtonDetail.text.open=\u8A73\u7D30>>
71+MessageDialogUI.jButtonDetail.text.open=\u8a73\u7d30>>
7272
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
7474
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
7676
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
7979
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
8181
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
8383
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
8585
86-ApplicationUI.jPanelAbout.TabConstraints.tabTitle=\u60C5\u5831
86+ApplicationUI.jPanelAbout.TabConstraints.tabTitle=\u60c5\u5831
8787
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
8989
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
9191
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
9393
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
9595
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
9797
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
9999
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
101101
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
103103
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
105105
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
107107
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
109109
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
111111
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
113113
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
115115
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
117117
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
119119
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\:
121121
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)
123123
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
125125
126-ApplicationUI.jPanelLDAP.TabConstraints\ tabToolTip=LDAP\u95A2\u4FC2\u306E\u8A2D\u5B9A
126+ApplicationUI.jPanelLDAP.TabConstraints\ tabToolTip=LDAP\u95a2\u4fc2\u306e\u8a2d\u5b9a
127127
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
129129
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
--- a/src/org/jent/checksmtp/Processer.java
+++ b/src/org/jent/checksmtp/Processer.java
@@ -13,10 +13,16 @@ import java.io.OutputStreamWriter;
1313 import java.io.PrintWriter;
1414
1515 import java.net.Socket;
16+import java.security.KeyManagementException;
17+import java.security.NoSuchAlgorithmException;
1618
1719 import java.util.ArrayList;
1820 import java.util.ListIterator;
1921 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;
2026
2127
2228 public class Processer implements Runnable, ResultNotify {
@@ -83,6 +89,7 @@ public class Processer implements Runnable, ResultNotify {
8389 BufferedReader clientReader;
8490 PrintWriter clientWriter;
8591
92+ SocketFactory socketFactory = null;
8693 Socket server = null;
8794
8895 try {
@@ -92,8 +99,36 @@ public class Processer implements Runnable, ResultNotify {
9299 //SMTP Server port
93100 int serverport = ApplicationProperties.getSmtpServerPort();
94101
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+
95130 //Connection to true SMTP server.
96- server = new Socket(servername, serverport);
131+ server = socketFactory.createSocket(servername, serverport);
97132 serverInput = server.getInputStream();
98133 serverOutput = server.getOutputStream();
99134 clientInput = client.getInputStream();
Show on old repository browser