I want to configure my mail-service.xml to send emails from my Gmail account. I have made a configuration, but it doesn't work
<?xml version="1.0" encoding="UTF-8"?>
<server>
  <mbean code="org.jboss.mail.MailService"
         name="jboss:service=Mail">
    <attribute name="JNDIName">java:/Mail</attribute>
    <attribute name="User">***@gmail.com</attribute>
    <attribute name="Password">***</attribute>
    <attribute name="Configuration">
      <configuration>
        <property name="mail.smtp.auth" value="true"/>
        <property name="mail.smtp.starttls.enable" value="true"/>
        <property name="mail.smtp.socketFactory.class" value="javax.net.ssl.SSLSocketFactory"/>
        <!-- Change to your mail server prototocol -->
        <property name="mail.store.protocol" value="pop3"/>
        <property name="mail.transport.protocol" value="smtp"/>
        <!-- Change to the user who will receive mail  -->
        <property name="mail.user" value="nobody"/>
        <!-- Change to the mail server  -->
        <property name="mail.pop3.host" value="pop3.nosuchhost.nosuchdomain.com"/>
        <!-- Change to the SMTP gateway server -->
        <property name="mail.smtp.host" value="smtp.gmail.com"/>
        <!-- The mail server port -->
        <property name="mail.smtp.port" value="465"/>
        <!-- Change to the address mail will be from  -->
        <property name="mail.from" value="[email protected]"/>
        <!-- Enable debugging output from the javamail classes -->
        <property name="mail.debug" value="false"/>
      </configuration>
    </attribute>
    <depends>jboss:service=Naming</depends>
  </mbean>
</server>