View Javadoc
1   /*
2    * Copyright 2012 The Kuali Foundation.
3    *
4    * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.sys.service.impl;
17  
18  import javax.mail.MessagingException;
19  
20  import org.kuali.rice.core.api.mail.MailMessage;
21  import org.kuali.rice.krad.exception.InvalidAddressException;
22  import org.kuali.rice.krad.service.impl.MailServiceImpl;
23  
24  public class DevelopmentMailServiceImpl extends MailServiceImpl {
25      private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(DevelopmentMailServiceImpl.class);
26  
27      @Override
28      public void sendMessage(MailMessage message) throws InvalidAddressException, MessagingException {
29          LOG.info( "*********************** EMAIL SEND *****************************");
30          LOG.info( "FROM : " + message.getToAddresses() );
31          LOG.info( "TO   : " + message.getFromAddress() );
32          LOG.info( "CC   : " + message.getCcAddresses() );
33          LOG.info( "BCC  : " + message.getBccAddresses() );
34          LOG.info( "SUBJECT : " + message.getSubject() );
35          LOG.info( "MESSAGE : \n" + message.getMessage() );
36  
37          LOG.info( "*********************** END EMAIL  *****************************");
38      }
39  }