com.ozacc.springframework.mail.javamail
クラス IntlMimeMessageHelper

java.lang.Object
  拡張MimeMessageHelper
      拡張com.ozacc.springframework.mail.javamail.IntlMimeMessageHelper

public class IntlMimeMessageHelper
extends MimeMessageHelper

国際化、とまでは言わないけど、日本語対応したMimeMessageHelperクラス。

バージョン:
$Id: IntlMimeMessageHelper.java,v 1.1 2004/08/02 20:39:06 otsuka Exp $
作成者:
Tomohiro Otsuka
関連項目:
直列化された形式

フィールドの概要
protected static java.lang.String JIS_ENCODING
           
protected  boolean multipart
           
 
コンストラクタの概要
IntlMimeMessageHelper(MimeMessage mimeMessage)
           
IntlMimeMessageHelper(MimeMessage mimeMessage, boolean multipart)
           
IntlMimeMessageHelper(MimeMessage mimeMessage, boolean multipart, java.lang.String encoding)
           
IntlMimeMessageHelper(MimeMessage mimeMessage, java.lang.String encoding)
           
 
メソッドの概要
 void addAttachment(java.lang.String attachmentFilename, DataSource dataSource)
          日本語のファイル名に対応しています。
protected  void setDate()
          送信日時を示すDateヘッダーを設定します。
 void setSubject(java.lang.String subject)
          メールの件名をセットします。
 void setText(java.lang.String text, boolean html)
          Sets the given text directly as content in non-multipart mode respectively as default body part in multipart mode.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

JIS_ENCODING

protected static final java.lang.String JIS_ENCODING
関連項目:
定数フィールド値

multipart

protected boolean multipart
コンストラクタの詳細

IntlMimeMessageHelper

public IntlMimeMessageHelper(MimeMessage mimeMessage)
                      throws MessagingException
パラメータ:
mimeMessage -
例外:
MessagingException

IntlMimeMessageHelper

public IntlMimeMessageHelper(MimeMessage mimeMessage,
                             java.lang.String encoding)
                      throws MessagingException
パラメータ:
mimeMessage -
例外:
MessagingException

IntlMimeMessageHelper

public IntlMimeMessageHelper(MimeMessage mimeMessage,
                             boolean multipart)
                      throws MessagingException
パラメータ:
mimeMessage -
multipart -
例外:
MessagingException

IntlMimeMessageHelper

public IntlMimeMessageHelper(MimeMessage mimeMessage,
                             boolean multipart,
                             java.lang.String encoding)
                      throws MessagingException
パラメータ:
mimeMessage -
multipart -
例外:
MessagingException
メソッドの詳細

setDate

protected void setDate()
                throws MessagingException
送信日時を示すDateヘッダーを設定します。

例外:
MessagingException

setSubject

public void setSubject(java.lang.String subject)
                throws MessagingException
メールの件名をセットします。

エンコーディングがJIS(ISO-2022-JP)の場合は、エンコーディングスキームがBase64になるようにしています。 これは携帯や古いMUAだと、Quoted-Printableエンコーディングに対応していない場合があるからです。

例外:
MessagingException
関連項目:
org.springframework.mail.javamail.MimeMessageHelper#setSubject(java.lang.String)

setText

public void setText(java.lang.String text,
                    boolean html)
             throws MessagingException
Sets the given text directly as content in non-multipart mode respectively as default body part in multipart mode.

パラメータ:
text - text to set
html - whether to apply content type "text/html" for an HTML mail, using default content type ("text/plain") else
例外:
MessagingException

addAttachment

public void addAttachment(java.lang.String attachmentFilename,
                          DataSource dataSource)
                   throws MessagingException
日本語のファイル名に対応しています。

このファイル名のエンコーディング方法はRFC違反かも知れませんが、Outlookでも正しく表示される方法を採っています。

例外:
MessagingException
関連項目:
org.springframework.mail.javamail.MimeMessageHelper#addAttachment(java.lang.String, javax.activation.DataSource)


Copyright © 2004 OZACC. All Rights Reserved.