/******************************************************************************* * Copyright (c) 2015 Development Gateway, Inc and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the MIT License (MIT) * which accompanies this distribution, and is available at * https://opensource.org/licenses/MIT * * Contributors: * Development Gateway - initial API and implementation *******************************************************************************/ package org.devgateway.toolkit.web.spring; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.mail.javamail.JavaMailSenderImpl; @Configuration public class EmailServiceConfiguration { private static final int SMTP_PORT = 25; @Bean public JavaMailSenderImpl javaMailSenderImpl() { JavaMailSenderImpl jmsi = new JavaMailSenderImpl(); jmsi.setHost("localhost"); jmsi.setPort(SMTP_PORT); return jmsi; } }