View Javadoc

1   package com.ozacc.mail;
2   
3   import javax.mail.internet.MimeMessage;
4   
5   /***
6    * SMTPサーバとの接続、切断を任意のタイミングで行いたい�?合に使用す�?SendMailインターフェース。
7    * <p>
8    * 大量メー�?配信で、MailやMimeMessageの配列を用意す�?とメモリを圧迫してしまう�?合などに使用します。<br>
9    * 接続のク��充ズを忘�?ないように丁盲してください。
10   * 
11   * @author Tomohiro Otsuka
12   * @version $Id: SendMailPro.java,v 1.1 2004/09/04 09:07:22 otsuka Exp $
13   */
14  public interface SendMailPro {
15  
16  	/***
17  	 * SMTPサーバに接続します。
18  	 * 
19  	 * @throws MailException
20  	 */
21  	void connect() throws MailException;
22  
23  	/***
24  	 * SMTPサーバとの接続をク��充ズします。
25  	 * 接続していない�?にこのメソッドを呼んでも何も行いません。
26  	 * 
27  	 * @throws MailException
28  	 */
29  	void disconnect() throws MailException;
30  
31  	/***
32  	 * 指定さ�?たMimeMessageを送信します。SMTPサーバに接続していない�?合は例外をス��充します。
33  	 * 
34  	 * @param mimeMessage
35  	 * @throws MailException
36  	 */
37  	void send(MimeMessage mimeMessage) throws MailException;
38  
39  	/***
40  	 * 指定さ�?たMailを送信します。SMTPサーバに接続していない�?合は例外をス��充します。
41  	 * 
42  	 * @param mail
43  	 * @throws MailException
44  	 */
45  	void send(Mail mail) throws MailException;
46  
47  }