Problem sending email by Demoiselle Mail

1

Good afternoon, folks,

I'm following the steps to send email through demoiselle mail, but I did not succeed. I made all the proposed settings in the documentation, in the console of the eclipse he says that the message was sent, but no e-mail arrived.

Below is the documentation link: link

Below are the implementations I've made in a test project.

pom.xml

    <dependency>
        <groupId>br.gov.frameworkdemoiselle.component</groupId>
        <artifactId>demoiselle-mail</artifactId>
        <version>2.1.0</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>



demoiselle.properties

# Configurações do Servidor de E-mail
[email protected]
frameworkdemoiselle.mail.password=minha senha
frameworkdemoiselle.mail.serverHost=smtp.gmail.com
frameworkdemoiselle.mail.serverPort=465
frameworkdemoiselle.mail.enable.ssl=true
frameworkdemoiselle.mail.auth=true
frameworkdemoiselle.mail.type=local
frameworkdemoiselle.mail.enable.tls=false
frameworkdemoiselle.mail.require.tls=false



Test class

import java.io.Serializable;

import javax.inject.Inject;

import br.gov.frameworkdemoiselle.mail.Mail;
import br.gov.frameworkdemoiselle.stereotype.ViewController;

@ViewController
public class TesteView implements Serializable {

private static final long serialVersionUID = 1L;

@Inject
private Mail mail;

public void enviar() {
    mail.from("[email protected]")
        .to("[email protected]")
        .body().text("Primeiro E-mail")
        .subject("Assunto")
        .importance().high().send();
}
}


In the index.jsf page I just inserted a commandButton

<ui:composition xmlns="http://www.w3.org/1999/xhtml"  
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                xmlns:h="http://java.sun.com/jsf/html"                     
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/template/main.xhtml">
 <ui:define name="body">
     <p:panel>
        <p:commandButton value="email" actionListener="#{testeView.enviar()}" />
     </p:panel>

 </ui:define>
</ui:composition>


When I start the server and try to send the e-mail, the eclipse console returns that the message was sent, but I do not receive any e-mail:

14:39:47,595 WARN  [br.gov.frameworkdemoiselle.internal.implementation.ConfigurationLoader] (http--0.0.0.0-8080-5) Não é necessário adicionar o ponto após o prefixo para uma classe de configuração. É recomendado que sejam retirados, pois poderão causar erros em versões futuras do  Framework.
14:39:47,674 INFO  [br.gov.frameworkdemoiselle.mail.internal.Dispatcher] (http--0.0.0.0-8080-5) Preparing to send message
14:39:47,690 INFO  [br.gov.frameworkdemoiselle.mail.internal.Dispatcher] (http--0.0.0.0-8080-5) Message Sent!



Follow the download link for the project:
link

    
asked by anonymous 09.04.2015 / 19:49

1 answer

1

In the list of users of the project commented on an implicit dependency that hindered execution. Based on your project I did some tests, doing the deletion of the library. In this link the modified project: link

I created a unit test to make it easy to run, and with some providers like yahoo and gmail it worked. Even an intern here at SERPRO which is the Express. There are cases where there is a firewall or proxy that can prevent communication. But an error should occur in these cases.

This dependency issue is a component bug. If you would like to collaborate, you can register at link

    
16.04.2015 / 19:40