View Javadoc

1   /*
2    * Copyright 2004-2006 the Seasar Foundation and the Others.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
13   * either express or implied. See the License for the specific language
14   * governing permissions and limitations under the License.
15   */
16  package org.seasar.tuigwaa.net;
17  
18  import java.util.Map;
19  import java.util.Properties;
20  
21  import org.seasar.tuigwaa.system.TgwServiceException;
22  
23  /***
24   * @author someda
25   */
26  public interface EmailService {
27  	
28  	public static final String MAIL_HOST = "org.seasar.tuigwa.MAIL_HOST";
29  	
30  	public static final String MAIL_PORT = "org.seasar.tuigwaa.MAIL_PORT";
31  	
32  	public static final String MAIL_CHARSET = "org.seasar.tuigwaa.MAIL_CHARSET";
33  	
34  	public static final String MAIL_FROM_ADDRESS = "org.seasar.tuigwaa.MAIL_FROM_ADDRESS";
35  	
36  	public static final String MAIL_FROM_PERSONEL = "org.seasar.tuigwaa.MAIL_FROM_PERSONEL";
37  	
38  	public static final String MAIL_CONTENTTYPE = "org.seasar.tuigwaa.MAIL_CONTENTTYPE";
39  	
40  	public static final String MAIL_REPLY_TO = "org.seasar.tuigwaa.MAIL_REPLY_TO";
41  	
42  	public static final String MAIL_SUBJECT = "org.seasar.tuigwaa.MAIL_SUBJECT";
43  	
44  	/***
45  	 * 
46  	 * @param toAddress address array, the mail sent to.
47  	 * @param mailContent, mail contents itself
48  	 * @param mailProperties represents mail properties such as subject, from address, and so on.
49  	 * @param headerMap represents mail header map, like Content-Transfer-Encoding as key, and 7bit as value. 
50  	 * @throws TgwServiceException
51  	 */
52  	public void sendEmail(String mailAddress, String mailContent, Properties mailProperties, Map headerMap) throws TgwServiceException;
53  	
54  }