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 * @since 1.0
12 * @author Tomohiro Otsuka
13 * @version $Id: SendMailPro.java,v 1.2 2004/09/13 07:08:33 otsuka Exp $
14 */
15 public interface SendMailPro {
16
17 /***
18 * SMTPサーバに接続します。
19 *
20 * @throws MailException
21 */
22 void connect() throws MailException;
23
24 /***
25 * SMTPサーバとの接続をク��充ズします。
26 * 接続していない�?にこのメソッドを呼んでも何も行いません。
27 *
28 * @throws MailException
29 */
30 void disconnect() throws MailException;
31
32 /***
33 * 指定さ�?たMimeMessageを送信します。SMTPサーバに接続していない�?合は例外をス��充します。
34 *
35 * @param mimeMessage
36 * @throws MailException
37 */
38 void send(MimeMessage mimeMessage) throws MailException;
39
40 /***
41 * 指定さ�?たMailを送信します。SMTPサーバに接続していない�?合は例外をス��充します。
42 *
43 * @param mail
44 * @throws MailException
45 */
46 void send(Mail mail) throws MailException;
47
48 }