<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
        <property name="host" value="smtp.gmail.com"/>
        <property name="port" value="25"/>
        <property name="username" value="seda1seda1seda@gmail.com"/>
        <property name="password" value="kukukuku"/>

        <property name="javaMailProperties">
             <props>
                <prop key="mail.transport.protocol">smtp</prop>
                <prop key="mail.debug">true</prop>
                <prop key="mail.smtp.auth">true</prop>
                <prop key="mail.smtp.ssl">true</prop>
                <prop key="mail.smtp.socketFactory.port">465</prop>
                <prop key="mail.smtp.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
                <prop key="mail.smtp.socketFactory.fallback">false</prop>
            </props>
        </property>
    </bean>

    <bean id="simpleMailMessage" class="org.springframework.mail.SimpleMailMessage">
        <property name="from" value="gghfhsh@mail.ru"/>
    </bean>
</beans>