• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision143 (tree)
Time2015-11-17 22:44:40
Authort_nakayama1971

Log Message

(empty log message)

Change Summary

Incremental Difference

--- trunk/framework/pjCom/src/project/common/EmailArticle.java (revision 142)
+++ trunk/framework/pjCom/src/project/common/EmailArticle.java (revision 143)
@@ -389,7 +389,7 @@
389389 // 認証
390390 Authenticator auth = null;
391391 if (this.user != null) {
392- auth = new Auth(this.user, this.password);
392+ auth = new PasswordAuthenticator(this.user, this.password);
393393 props.setProperty("mail.smtp.auth", "true");
394394 props.setProperty("mail.smtp.port", "587");
395395 props.setProperty("mail.smtp.starttls.enable", "true");
@@ -502,8 +502,9 @@
502502 for (int i = 0; i < ret.length; i++) {
503503 int loc = address[i].lastIndexOf(':');
504504 if (0 <= loc) {
505- ret[i] = new InternetAddressEx(address[i].substring(0, loc),
506- address[i].substring(loc + ":".length()));
505+ InternetAddressEx ex = new InternetAddressEx(address[i].substring(0, loc));
506+ ex.setPersonal(address[i].substring(loc + ":".length()));
507+ ret[i] = ex;
507508 } else {
508509 ret[i] = new InternetAddress(address[i]);
509510 }
@@ -515,19 +516,24 @@
515516 * InternetAddress拡張
516517 * @author Tadashi Nakayama
517518 */
518- private static final class InternetAddressEx extends InternetAddress {
519+ public static final class InternetAddressEx extends InternetAddress {
519520 /** serialVersionUID */
520521 private static final long serialVersionUID = 8583837194606507146L;
521522
522523 /**
523524 * コンストラクタ
524- * @param ads アドレス
525- * @param psn 人物
526- * @throws UnsupportedEncodingException 例外
525+ * @param val アドレス
527526 */
528- InternetAddressEx(final String ads, final String psn)
529- throws UnsupportedEncodingException {
530- super(ads, psn, MojiUtil.CHARSET_XJIS.name());
527+ public InternetAddressEx(final String val) {
528+ super.setAddress(val);
529+ }
530+
531+ /**
532+ * @see javax.mail.internet.InternetAddress#setPersonal(java.lang.String)
533+ */
534+ @Override
535+ public void setPersonal(final String name) throws UnsupportedEncodingException {
536+ super.setPersonal(name, MojiUtil.CHARSET_XJIS.name());
531537 if (super.encodedPersonal != null) {
532538 super.encodedPersonal = super.encodedPersonal.replace(
533539 MojiUtil.CHARSET_XJIS.name(), MojiUtil.CHARSET_JIS.name());
@@ -541,7 +547,7 @@
541547 * @author Tadashi Nakayama
542548 * @version 1.0.0
543549 */
544- private static final class Auth extends Authenticator {
550+ public static final class PasswordAuthenticator extends Authenticator {
545551 /** ユーザID */
546552 private final String user;
547553 /** パスワード */
@@ -553,7 +559,7 @@
553559 * @param u ユーザID
554560 * @param p パスワード
555561 */
556- Auth(final String u, final String p) {
562+ public PasswordAuthenticator(final String u, final String p) {
557563 this.user = u;
558564 this.password = p;
559565 }
@@ -573,7 +579,7 @@
573579 * @author Tadashi Nakayama
574580 * @version 1.0.0
575581 */
576- private static final class JisDataSource implements DataSource {
582+ public static final class JisDataSource implements DataSource {
577583 /** 文字列 */
578584 private final String data;
579585
@@ -582,7 +588,7 @@
582588 *
583589 * @param str 文字列
584590 */
585- JisDataSource(final String str) {
591+ public JisDataSource(final String str) {
586592 this.data = str;
587593 }
588594