You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Lorenzo Solano <Lo...@claro.com.do> on 2011/02/22 22:14:17 UTC

Problem sending emails to groups

Hello,


I'm sending messages using SimpleMail class; and have this problem:

All email recipients, that are individual email accounts on my company receive the message; but when I add a group email ID; none of the members are not reached.

Code snnipet:
        Email email = new SimpleEmail();

        email.setHostName("XXX.XXX.XXX.XXX");
        email.setAuthenticator(new DefaultAuthenticator(
                "XXXXX", "XXXX"));

        Map<String, String> flags = new HashMap<String, String>();
        String categoryFlag = null;

        switch (cat) {
        case INFO:
            categoryFlag = "4 (low)";
            break;
        case WARN:
            categoryFlag = "3 (normal)";
            break;
        case ERROR:
            categoryFlag = "2 (high)";
            break;
        case FATAL:
            categoryFlag = "1 (highest)";
        }

        flags.put("X-Priority", categoryFlag);

        email.setHeaders(flags);
        email.setTLS(true);
        email.setFrom("Dummy@my.domain.com");
        email.setSubject("Test Mail Using Apache SimpleEmail, from commons");
        email.setMsg("Test Mail Using Apache SimpleEmail, from commons.\n\n Please do not reply.");

        email.addTo("Valid_Individual_Email_Id@my.domain.com ");  //This address is reached just fine.
        email.addTo("Valid_Group_Email_Id @my.domain.com ");            //This address, and any other group; is not reached!
        email.send();
                    ....

Did someone has faced this problem before?


Notes: We are using MS-Exchange.

Regards,

Lorenzo Solano
IT, BILLING SYSTEM
* (809)220-5225
*   Lorenzo_Solano@codetel.com.do<ma...@codetel.com.do>

Antipatrones de diseño de software / Software design anti-patterns

Reinventar la rueda: Enfrentarse a las situaciones buscando soluciones desde cero, sin tener en cuenta otras que puedan existir ya para afrontar los mismos problemas.

Reinventing the wheel: Failing to adopt an existing, adequate solution

Reinventar la rueda cuadrada: Crear una solución pobre cuando ya existe una buena.

Reinventing the square wheel: To create a poor solution when a good one already exists.


________________________________

Este mensaje puede contener información privilegiada y confidencial. Dicha información es exclusivamente para el uso del individuo o entidad al cual es enviada. Si el lector de este mensaje no es el destinatario del mismo, queda formalmente notificado que cualquier divulgación, distribución, reproducción o copiado de esta comunicación está estrictamente prohibido. Si este es el caso, favor de eliminar el mensaje de su computadora e informar al emisor a través de un mensaje de respuesta. Las opiniones expresadas en este mensaje son propias del autor y no necesariamente coinciden con las de la Compañía Dominicana de Teléfonos.


Gracias.

Compañía Dominicana de Teléfonos


This message may contain information that is priviliged and confidential. It is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, reproduction or copying of this communication is strictly prohibited. If this is the case, please proceed to destroy the message from your computer and inform the sender through reply mail. Information in this message that does not directly relate to the official business of the company shall be understood as neither given nor endorsed by it.

Thank you.

Compañía Dominicana de Teléfonos