You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Lars Heinemann <lh...@apache.org> on 2010/07/01 09:30:23 UTC

Re: mail marshaller deployment problems

Have u had a look at the servicemix-mail cookbook page at
http://servicemix.apache.org/simple-mail-forwarding.html.

I think it should be only a matter of replacing the mail poller with a
file poller and do the logic for filling the messageexchange properly.

Regards
Lars


2010/6/30 zaone84 <sp...@libero.it>:
>
> Hi Xavier, i am a newbie, i must create a file-poller that invoke an
> mail-sender to send emails to the recipients that are specified in the
> messages that are in the folder were the file-poller watch to poll file. I
> would know if can you help me in this,  or if can you send me your sa. I
> know that my request probably is a bad request, but here when i send an
> email never receive answer, and i don't know to ask about! Thanks!
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/mail-marshaller-deployment-problems-tp511299p512207.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>



-- 
http://lhein.blogspot.com

Re: mail marshaller deployment problems

Posted by Lars Heinemann <lh...@apache.org>.
zaone84,

why do you code your own servicemix-mail instead of just using it?
It is really somewhat easy to setup your application that I can't get
behind your problem.

The behaviour of the DefaultMailMarshaler is described very detailed
on the wiki page of servicemix-mail
at http://servicemix.apache.org/servicemix-mail .

To setup your application you have to do your own file marshaler which
creates a message exchange which can
be understood by the mail sender endpoint. That said you need to fill
the message properties described in section
"Mapping of headers and properties" of the servicemix-mail wiki.
So if you have just binary files which should be sent somewhere you
can just let them be attached to the normalized message as
a binary attachment (DataHandler). If you intend to pull XML files and
want to use the content of that files as mail body you can do this
by setting it to one of content of the normalized message or use the
message property "org.apache.servicemix.mail.html" for that.

Another way can be to do your own mail marshaler by subclassing the
default mail marshaler and put your evaluation logic for the
message sent by the file poller endpoint in there.

Regards
Lars



2010/7/1 zaone84 <sp...@libero.it>:
>
> Hi to all, i have solved creating a web service that expose the sendMail
> service on the bus, and internally there is a pojo that uses javaMail.jar
> that sends the emails, but now the problem is that:
> When i test the program on eclipse all work fine, but when i deploy this sa
> on servicemix there is a courios problem, the smtp server is automatically
> changed (from servicemix i suppose) from smtp.gmail.com to local host.
> Pratically is as the properties that i specify in my pom to work properly
> with google mail, are canceled and other default properties that i do not
> know from were they come are referenced. Here are the two debug info:
> java application on eclipse:
> DEBUG: setDebug: JavaMail version 1.4.3
> DEBUG: getProvider() returning
> javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
> Microsystems, Inc]
> DEBUG SMTP: useEhlo true, useAuth true
> DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false
> 220 mx.google.com ESMTP g37sm38214wbg.9
> DEBUG SMTP: connected to host "smtp.gmail.com", port: 25
>
> EHLO linux-go02.site
> 250-mx.google.com at your service, [93.39.242.2]
> 250-SIZE 35651584
> 250-8BITMIME
> 250-STARTTLS
> 250 ENHANCEDSTATUSCODES
> DEBUG SMTP: Found extension "SIZE", arg "35651584"
> DEBUG SMTP: Found extension "8BITMIME", arg ""
> DEBUG SMTP: Found extension "STARTTLS", arg ""
> DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
> STARTTLS
> 220 2.0.0 Ready to start TLS
> EHLO linux-go02.site
> 250-mx.google.com at your service, [93.39.242.2]
> 250-SIZE 35651584
> 250-8BITMIME
> 250-AUTH LOGIN PLAIN XOAUTH
> 250 ENHANCEDSTATUSCODES
> DEBUG SMTP: Found extension "SIZE", arg "35651584"
> DEBUG SMTP: Found extension "8BITMIME", arg ""
> DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH"
> DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
> DEBUG SMTP: Attempt to authenticate
> DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
> AUTH LOGIN
> 334 VXNlcm5hbWU6
> bWFpbGluZ2xpc3QuYXppZW5kYWxlQGdtYWlsLmNvbQ==
> 334 UGFzc3dvcmQ6
> bWFpbGluZzIwMTA=
> 235 2.7.0 Accepted
> DEBUG: getProvider() returning
> javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
> Microsystems, Inc]
> DEBUG SMTP: useEhlo true, useAuth true
> DEBUG SMTP: useEhlo true, useAuth true
> DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false
> 220 mx.google.com ESMTP w43sm11803585eeh.3
> DEBUG SMTP: connected to host "smtp.gmail.com", port: 25
>
> EHLO linux-go02.site
> 250-mx.google.com at your service, [93.39.242.2]
> 250-SIZE 35651584
> 250-8BITMIME
> 250-STARTTLS
> 250 ENHANCEDSTATUSCODES
> DEBUG SMTP: Found extension "SIZE", arg "35651584"
> DEBUG SMTP: Found extension "8BITMIME", arg ""
> DEBUG SMTP: Found extension "STARTTLS", arg ""
> DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
> STARTTLS
> 220 2.0.0 Ready to start TLS
> EHLO linux-go02.site
> 250-mx.google.com at your service, [93.39.242.2]
> 250-SIZE 35651584
> 250-8BITMIME
> 250-AUTH LOGIN PLAIN XOAUTH
> 250 ENHANCEDSTATUSCODES
> DEBUG SMTP: Found extension "SIZE", arg "35651584"
> DEBUG SMTP: Found extension "8BITMIME", arg ""
> DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH"
> DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
> DEBUG SMTP: Attempt to authenticate
> DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
> AUTH LOGIN
> 334 VXNlcm5hbWU6
> bWFpbGluZ2xpc3QuYXppZW5kYWxlQGdtYWlsLmNvbQ==
> 334 UGFzc3dvcmQ6
> bWFpbGluZzIwMTA=
> 235 2.7.0 Accepted
> DEBUG SMTP: use8bit false
> MAIL FROM:<ma...@gmail.com>
> 250 2.1.0 OK w43sm11803585eeh.3
> RCPT TO:<sp...@libero.it>
> 250 2.1.5 OK w43sm11803585eeh.3
> DEBUG SMTP: Verified Addresses
> DEBUG SMTP:   spatca@libero.it
> DATA
> 354  Go ahead w43sm11803585eeh.3
> Date: Thu, 1 Jul 2010 19:07:08 +0200 (CEST)
> From: mailinglist.aziendale@gmail.com
> To: spatca@libero.it
> Message-ID: <69...@linux-go02>
> Subject: email aziendale
> MIME-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> ciao come va? todo bien? grazie
> .
> 250 2.0.0 OK 1278004034 w43sm11803585eeh.3
> QUIT
> 221 2.0.0 closing connection w43sm11803585eeh.3
> OK
>
> webservice on servicemix:
> Loading javamail.default.providers from
> jar:file:/root/.m2/repository/javaMail/mail/1.4.3/mail-1.4.3.jar!/META-INF/javamail.default.providers
> DEBUG: loading new provider protocol=imap,
> className=com.sun.mail.imap.IMAPStore, vendor=Sun Microsystems, Inc,
> version=null
> DEBUG: loading new provider protocol=imaps,
> className=com.sun.mail.imap.IMAPSSLStore, vendor=Sun Microsystems, Inc,
> version=null
> DEBUG: loading new provider protocol=smtp,
> className=com.sun.mail.smtp.SMTPTransport, vendor=Sun Microsystems, Inc,
> version=null
> DEBUG: loading new provider protocol=smtps,
> className=com.sun.mail.smtp.SMTPSSLTransport, vendor=Sun Microsystems, Inc,
> version=null
> DEBUG: loading new provider protocol=pop3,
> className=com.sun.mail.pop3.POP3Store, vendor=Sun Microsystems, Inc,
> version=null
> DEBUG: loading new provider protocol=pop3s,
> className=com.sun.mail.pop3.POP3SSLStore, vendor=Sun Microsystems, Inc,
> version=null
> DEBUG: getProvider() returning provider protocol=smtp;
> type=javax.mail.Provider$Type@759c1f49;
> class=com.sun.mail.smtp.SMTPTransport; vendor=Sun Microsystems, Inc
> DEBUG SMTP: useEhlo true, useAuth false
> DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false
> 220 linux-go02.site ESMTP Postfix
> DEBUG SMTP: connected to host "localhost", port: 25
>
> EHLO linux-go02.site
> 250-linux-go02.site
> 250-PIPELINING
> 250-SIZE
> 250-VRFY
> 250-ETRN
> 250-ENHANCEDSTATUSCODES
> 250-8BITMIME
> 250 DSN
> DEBUG SMTP: Found extension "PIPELINING", arg ""
> DEBUG SMTP: Found extension "SIZE", arg ""
> DEBUG SMTP: Found extension "VRFY", arg ""
> DEBUG SMTP: Found extension "ETRN", arg ""
> DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
> DEBUG SMTP: Found extension "8BITMIME", arg ""
> DEBUG SMTP: Found extension "DSN", arg ""
> DEBUG SMTP: use8bit false
> MAIL FROM:<ma...@gmail.com>
> 250 2.1.0 Ok
> RCPT TO:<sp...@libero.it>
> 250 2.1.5 Ok
> DEBUG SMTP: Verified Addresses
> DEBUG SMTP:   spatca@libero.it
> DATA
> 354 End data with <CR><LF>.<CR><LF>
> Date: Thu, 1 Jul 2010 19:13:07 +0200
> From: mailinglist.aziendale@gmail.com
> To: spatca@libero.it
> Subject: email aziendale
> MIME-Version: 1.0
> Content-Transfer-Encoding: quoted-printable
> Content-Type: text/plain; charset=UTF-8
>
> ciao ti =C3=A8 arrivata l'email? o no?
> .
> 250 2.0.0 Ok: queued as 3970010257
> QUIT
> 221 2.0.0 Bye
> OK
> 1-lug-2010 19.13.08
> org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
> INFO: Outbound Message
> ---------------------------
> Encoding: UTF-8
> Headers:
> Messages:
> Payload: <jbi:message
> xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
> xmlns:msg="http://mailSender.samples.servicemix.apache.org/"
> type="msg:sendEmailResponse"><jbi:part><ns2:sendEmailResponse
> xmlns:ns2="http://mailSender.samples.servicemix.apache.org/"
> /></jbi:part></jbi:message>
> --------------------------------------
>
> my code is:
> @SuppressWarnings("restriction")
> @WebService(targetNamespace
> ="http://mailSender.samples.servicemix.apache.org/",
> serviceName="mailSendService" ,
> endpointInterface="org.apache.servicemix.samples.mailSender.mailSend")
>
> public class mailSendImpl implements mailSend {
>
>
>
>
>        public mailSendImpl() {
>                super();
>                // TODO Auto-generated constructor stub
>        }
>
>        public void sendEmail(String testo, String dest){
>
>
>                 try {
>                         Authenticator auth = new SMTPAuthenticator();
>
>                           // Properties props = System.getProperties();
>                         Properties props = new Properties();
>                            props.put( "mail.smtp.host", "smtp.gmail.com" );
>                            props.put("mail.smtp.starttls.enable","true");
>                            props.put("mail.smtp.auth", "true");
>
>
>                            //Session session = Session.getDefaultInstance( props, auth );
>                            Session session = Session.getInstance(props, auth);
>                            session.setDebug(true);
>
>                            Message message = new MimeMessage( session );
>
>                            InternetAddress from = new InternetAddress(
> "mailinglist.aziendale@gmail.com" );
>                            InternetAddress to[] = InternetAddress.parse( dest );
>
>                            message.setFrom( from );
>                            message.setRecipients( Message.RecipientType.TO, to );
>                            message.setSubject( "email aziendale" );
>                            message.setSentDate( new Date() );
>                            message.setText( testo );
>
>
>
>                            Transport.send(message);
>
>
>                            System.out.println("OK");
>                            } catch(MessagingException e) {
>                              e.printStackTrace();
>                            }
>
>
>
>        }
>
> }
>
> How i can do to risolve this problem?
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/mail-marshaller-deployment-problems-tp511299p512440.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>



-- 
http://lhein.blogspot.com

Re: mail marshaller deployment problems

Posted by Javier Arias <xa...@yahoo.com>.
Hi zaone,
yes, you have to deploy your compiled class (you can compile using maven, ant, eclipse or any other tool). I can't help with your maven problems, I deploy using an ant script. A way to be sure, can be deploying manually (modify an existing-working sa to include your new SU).
Unfortunatelly, I cannot attach my SA (i am working on a customer and it is not allowed). If you send me your sa, I can have a quick look.
Regards.




________________________________
From: zaone84 <sp...@libero.it>
To: users@servicemix.apache.org
Sent: Mon, July 5, 2010 11:14:25 AM
Subject: Re: mail marshaller deployment problems


Hi, i don't having solved the host problem with the javamail implementation,
i turn on the first way ad have followed your strategy. But it does not
work, and because i am sure that your implementation work fine securely i
have not understand very well what i must do. now the mail sender
implementation is this:
<mail:sender service="ms:mailService" 
                 endpoint="senderEndpoint"
                 sender="webmaster@dangerousnet.com"
                
                 debugMode="true" 
                 connection="smtp://webmaster@dangerousnet.com?password=my">  
                 <property name="marshaler">
                <bean
class="org.apache.servicemix.mailSender.XmlMailMarshaler" />
            </property> 
            </mail:sender>

i have copied your code in a file XmlMailMarshaller.java, and i have
inserted this file in mailSU/src/main/resources wher there is the xbean.xml,
but it does not work, i have your previous error, the file that i must
insert in tu mailSU must be a xmlMailMarshaler.class? And if is this, how
can i compile it? I I believe that this is dealing with Maven... otherwise
can you mail me your project? Thanks

-- 
View this message in context: http://servicemix.396122.n5.nabble.com/mail-marshaller-deployment-problems-tp511299p696463.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.



      

Re: mail marshaller deployment problems

Posted by zaone84 <sp...@libero.it>.
Hi, i don't having solved the host problem with the javamail implementation,
i turn on the first way ad have followed your strategy. But it does not
work, and because i am sure that your implementation work fine securely i
have not understand very well what i must do. now the mail sender
implementation is this:
<mail:sender service="ms:mailService" 
                 endpoint="senderEndpoint"
                 sender="webmaster@dangerousnet.com"
                
                 debugMode="true" 
                 connection="smtp://webmaster@dangerousnet.com?password=my">  
                 <property name="marshaler">
                <bean
class="org.apache.servicemix.mailSender.XmlMailMarshaler" />
            </property> 
            </mail:sender>

i have copied your code in a file XmlMailMarshaller.java, and i have
inserted this file in mailSU/src/main/resources wher there is the xbean.xml,
but it does not work, i have your previous error, the file that i must
insert in tu mailSU must be a xmlMailMarshaler.class? And if is this, how
can i compile it? I I believe that this is dealing with Maven... otherwise
can you mail me your project? Thanks

-- 
View this message in context: http://servicemix.396122.n5.nabble.com/mail-marshaller-deployment-problems-tp511299p696463.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: mail marshaller deployment problems

Posted by Javier Arias <xa...@yahoo.com>.
hi zaone
here you will find my sample marshaler, and mail configuration:
I deployed the marshaler inside the su.
hope this helps.

MAIL SENDER XBEAN.XML:
=======================

       xmlns:util="http://www.springframework.org/schema/util"    
       xmlns:esb="http://com.my.integration"
       xmlns:mykamel="urn:my:camel">

<mail:sender service="mykamel:emailsndr"
            endpoint="emailendp"
            sender="piloto.my@my.com"
            debugMode="true"
            connection="smtp://piloto.my@mail.my.com?password=MY">
            <property name="marshaler">
                <bean class="com.my.integration.XmlMailMarshaler" />
            </property>
</mail:sender>

MARSHALER : makes the mail component to send a mail when an xml is received : <mail><to>xa@ya.com,jo@g.com</to><subject>hello</subject><body>the body </body></mail>
============================

public class XmlMailMarshaler extends AbstractMailMarshaler {

    private static Log log = LogFactory.getLog(XmlMailMarshaler.class);
    
    @Override
    public void convertJBIToMail(MimeMessage mimeMessage, MessageExchange exchange, NormalizedMessage nmsg, String configuredSender, String dos) throws MessagingException {
        log.debug(" convertJBIToMail - START.");
        try {
            //     first fill the headers of the mail
            fillMail(mimeMessage, exchange, nmsg,configuredSender);    
        } catch (Exception ex) {
            log.error(" convertJBIToMail - Exception : ",ex);
            throw new javax.mail.MessagingException(ex.getMessage(), ex);
        }
        log.debug(" convertJBIToMail - END.");
        
    }



    private void fillMail(MimeMessage mimeMessage, MessageExchange exchange, NormalizedMessage nmsg, String configuredSender) throws MessagingException, javax.jbi.messaging.MessagingException, TransformerException, ParserConfigurationException, IOException, SAXException {
        
        Document doc = this.getXmlMailDoc(nmsg);
        
        NodeList list = null;
        String value = "";
        
        //handle mail: to    
        value=getUniqueValueFor(doc,"to");
        Address[] to = InternetAddress.parse(value);
        if (to != null) {
            mimeMessage.setRecipients(Message.RecipientType.TO, to);
        }
        
        //handle mail: subject    
        value=getUniqueValueFor(doc,"subject");
        mimeMessage.setSubject(value);
        
        //handle mail: body    
        mimeMessage.setText(getUniqueValueFor(doc,"body"));
        
    }

    private String getUniqueValueFor(Document doc, String tag) throws AddressException, MessagingException {
        NodeList list;
        list = doc.getElementsByTagName(tag);
        if (list.getLength() == 1) {
            Node n = list.item(0);
            return n.getTextContent();
        
        }
        else
            throw new MessagingException("received JBI msg does not include the mandatory-unique to tag : "+doc.toString());
    }

    private Document getXmlMailDoc(NormalizedMessage nmsg) throws javax.jbi.messaging.MessagingException, TransformerException, ParserConfigurationException, IOException, SAXException {        
        SourceTransformer st = new SourceTransformer();
        return st.toDOMDocument(nmsg);
    }

    @Override
    public void convertMailToJBI(MessageExchange exchange, NormalizedMessage nmsg, MimeMessage mailMsg) throws MessagingException {
        // TODO Auto-generated method stub
        
    }


}





________________________________
From: zaone84 <sp...@libero.it>
To: users@servicemix.apache.org
Sent: Thu, July 1, 2010 8:47:00 PM
Subject: Re: mail marshaller deployment problems


Hi to all, i have solved creating a web service that expose the sendMail
service on the bus, and internally there is a pojo that uses javaMail.jar
that sends the emails, but now the problem is that:
When i test the program on eclipse all work fine, but when i deploy this sa
on servicemix there is a courios problem, the smtp server is automatically
changed (from servicemix i suppose) from smtp.gmail.com to local host.
Pratically is as the properties that i specify in my pom to work properly
with google mail, are canceled and other default properties that i do not
know from were they come are referenced. Here are the two debug info:
java application on eclipse:
DEBUG: setDebug: JavaMail version 1.4.3
DEBUG: getProvider() returning
javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false
220 mx.google.com ESMTP g37sm38214wbg.9
DEBUG SMTP: connected to host "smtp.gmail.com", port: 25

EHLO linux-go02.site
250-mx.google.com at your service, [93.39.242.2]
250-SIZE 35651584
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES
DEBUG SMTP: Found extension "SIZE", arg "35651584"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
STARTTLS
220 2.0.0 Ready to start TLS
EHLO linux-go02.site
250-mx.google.com at your service, [93.39.242.2]
250-SIZE 35651584
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH
250 ENHANCEDSTATUSCODES
DEBUG SMTP: Found extension "SIZE", arg "35651584"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH"
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM 
AUTH LOGIN
334 VXNlcm5hbWU6
bWFpbGluZ2xpc3QuYXppZW5kYWxlQGdtYWlsLmNvbQ==
334 UGFzc3dvcmQ6
bWFpbGluZzIwMTA=
235 2.7.0 Accepted
DEBUG: getProvider() returning
javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false
220 mx.google.com ESMTP w43sm11803585eeh.3
DEBUG SMTP: connected to host "smtp.gmail.com", port: 25

EHLO linux-go02.site
250-mx.google.com at your service, [93.39.242.2]
250-SIZE 35651584
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES
DEBUG SMTP: Found extension "SIZE", arg "35651584"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
STARTTLS
220 2.0.0 Ready to start TLS
EHLO linux-go02.site
250-mx.google.com at your service, [93.39.242.2]
250-SIZE 35651584
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH
250 ENHANCEDSTATUSCODES
DEBUG SMTP: Found extension "SIZE", arg "35651584"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH"
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM 
AUTH LOGIN
334 VXNlcm5hbWU6
bWFpbGluZ2xpc3QuYXppZW5kYWxlQGdtYWlsLmNvbQ==
334 UGFzc3dvcmQ6
bWFpbGluZzIwMTA=
235 2.7.0 Accepted
DEBUG SMTP: use8bit false
MAIL FROM:<ma...@gmail.com>
250 2.1.0 OK w43sm11803585eeh.3
RCPT TO:<sp...@libero.it>
250 2.1.5 OK w43sm11803585eeh.3
DEBUG SMTP: Verified Addresses
DEBUG SMTP:  spatca@libero.it
DATA
354  Go ahead w43sm11803585eeh.3
Date: Thu, 1 Jul 2010 19:07:08 +0200 (CEST)
From: mailinglist.aziendale@gmail.com
To: spatca@libero.it
Message-ID: <69...@linux-go02>
Subject: email aziendale
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

ciao come va? todo bien? grazie
.
250 2.0.0 OK 1278004034 w43sm11803585eeh.3
QUIT
221 2.0.0 closing connection w43sm11803585eeh.3
OK

webservice on servicemix:
Loading javamail.default.providers from
jar:file:/root/.m2/repository/javaMail/mail/1.4.3/mail-1.4.3.jar!/META-INF/javamail.default.providers                
DEBUG: loading new provider protocol=imap,
className=com.sun.mail.imap.IMAPStore, vendor=Sun Microsystems, Inc,
version=null                                  
DEBUG: loading new provider protocol=imaps,
className=com.sun.mail.imap.IMAPSSLStore, vendor=Sun Microsystems, Inc,
version=null                              
DEBUG: loading new provider protocol=smtp,
className=com.sun.mail.smtp.SMTPTransport, vendor=Sun Microsystems, Inc,
version=null                              
DEBUG: loading new provider protocol=smtps,
className=com.sun.mail.smtp.SMTPSSLTransport, vendor=Sun Microsystems, Inc,
version=null                          
DEBUG: loading new provider protocol=pop3,
className=com.sun.mail.pop3.POP3Store, vendor=Sun Microsystems, Inc,
version=null                                  
DEBUG: loading new provider protocol=pop3s,
className=com.sun.mail.pop3.POP3SSLStore, vendor=Sun Microsystems, Inc,
version=null                              
DEBUG: getProvider() returning provider protocol=smtp;
type=javax.mail.Provider$Type@759c1f49;
class=com.sun.mail.smtp.SMTPTransport; vendor=Sun Microsystems, Inc                    
DEBUG SMTP: useEhlo true, useAuth false                                        
DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false        
220 linux-go02.site ESMTP Postfix                                              
DEBUG SMTP: connected to host "localhost", port: 25                            

EHLO linux-go02.site
250-linux-go02.site 
250-PIPELINING      
250-SIZE            
250-VRFY            
250-ETRN            
250-ENHANCEDSTATUSCODES
250-8BITMIME          
250 DSN                
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "SIZE", arg ""      
DEBUG SMTP: Found extension "VRFY", arg ""      
DEBUG SMTP: Found extension "ETRN", arg ""      
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""          
DEBUG SMTP: Found extension "DSN", arg ""                
DEBUG SMTP: use8bit false                                
MAIL FROM:<ma...@gmail.com>              
250 2.1.0 Ok                                            
RCPT TO:<sp...@libero.it>                              
250 2.1.5 Ok                                            
DEBUG SMTP: Verified Addresses                          
DEBUG SMTP:  spatca@libero.it                          
DATA                                                    
354 End data with <CR><LF>.<CR><LF>                      
Date: Thu, 1 Jul 2010 19:13:07 +0200                    
From: mailinglist.aziendale@gmail.com                    
To: spatca@libero.it                                    
Subject: email aziendale                                
MIME-Version: 1.0                                        
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8

ciao ti =C3=A8 arrivata l'email? o no?
.
250 2.0.0 Ok: queued as 3970010257
QUIT
221 2.0.0 Bye
OK
1-lug-2010 19.13.08
org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
INFO: Outbound Message
---------------------------
Encoding: UTF-8
Headers:
Messages:
Payload: <jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://mailSender.samples.servicemix.apache.org/"
type="msg:sendEmailResponse"><jbi:part><ns2:sendEmailResponse
xmlns:ns2="http://mailSender.samples.servicemix.apache.org/"
/></jbi:part></jbi:message>
--------------------------------------

my code is:
@SuppressWarnings("restriction")
@WebService(targetNamespace
="http://mailSender.samples.servicemix.apache.org/",
serviceName="mailSendService" ,
endpointInterface="org.apache.servicemix.samples.mailSender.mailSend")

public class mailSendImpl implements mailSend {
    
    
    
    
    public mailSendImpl() {
        super();
        // TODO Auto-generated constructor stub
    }

    public void sendEmail(String testo, String dest){
          
        
         try {
             Authenticator auth = new SMTPAuthenticator();
    
               // Properties props = System.getProperties();
             Properties props = new Properties();
                props.put( "mail.smtp.host", "smtp.gmail.com" );
                props.put("mail.smtp.starttls.enable","true");
                props.put("mail.smtp.auth", "true");
                

                //Session session = Session.getDefaultInstance( props, auth );
                Session session = Session.getInstance(props, auth);
                session.setDebug(true);
              
                Message message = new MimeMessage( session );

                InternetAddress from = new InternetAddress(
"mailinglist.aziendale@gmail.com" );
                InternetAddress to[] = InternetAddress.parse( dest );

                message.setFrom( from );
                message.setRecipients( Message.RecipientType.TO, to );
                message.setSubject( "email aziendale" );
                message.setSentDate( new Date() );
                message.setText( testo );
              
              
            
                Transport.send(message);
                
                
                System.out.println("OK");
                } catch(MessagingException e) {
                  e.printStackTrace();
                }
        
        
        
    }
    
}

How i can do to risolve this problem?



-- 
View this message in context: http://servicemix.396122.n5.nabble.com/mail-marshaller-deployment-problems-tp511299p512440.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.



      

Re: mail marshaller deployment problems

Posted by zaone84 <sp...@libero.it>.
Hi to all, i have solved creating a web service that expose the sendMail
service on the bus, and internally there is a pojo that uses javaMail.jar
that sends the emails, but now the problem is that:
When i test the program on eclipse all work fine, but when i deploy this sa
on servicemix there is a courios problem, the smtp server is automatically
changed (from servicemix i suppose) from smtp.gmail.com to local host.
Pratically is as the properties that i specify in my pom to work properly
with google mail, are canceled and other default properties that i do not
know from were they come are referenced. Here are the two debug info:
java application on eclipse:
DEBUG: setDebug: JavaMail version 1.4.3
DEBUG: getProvider() returning
javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false
220 mx.google.com ESMTP g37sm38214wbg.9
DEBUG SMTP: connected to host "smtp.gmail.com", port: 25

EHLO linux-go02.site
250-mx.google.com at your service, [93.39.242.2]
250-SIZE 35651584
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES
DEBUG SMTP: Found extension "SIZE", arg "35651584"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
STARTTLS
220 2.0.0 Ready to start TLS
EHLO linux-go02.site
250-mx.google.com at your service, [93.39.242.2]
250-SIZE 35651584
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH
250 ENHANCEDSTATUSCODES
DEBUG SMTP: Found extension "SIZE", arg "35651584"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH"
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM 
AUTH LOGIN
334 VXNlcm5hbWU6
bWFpbGluZ2xpc3QuYXppZW5kYWxlQGdtYWlsLmNvbQ==
334 UGFzc3dvcmQ6
bWFpbGluZzIwMTA=
235 2.7.0 Accepted
DEBUG: getProvider() returning
javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false
220 mx.google.com ESMTP w43sm11803585eeh.3
DEBUG SMTP: connected to host "smtp.gmail.com", port: 25

EHLO linux-go02.site
250-mx.google.com at your service, [93.39.242.2]
250-SIZE 35651584
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES
DEBUG SMTP: Found extension "SIZE", arg "35651584"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
STARTTLS
220 2.0.0 Ready to start TLS
EHLO linux-go02.site
250-mx.google.com at your service, [93.39.242.2]
250-SIZE 35651584
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH
250 ENHANCEDSTATUSCODES
DEBUG SMTP: Found extension "SIZE", arg "35651584"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH"
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: check mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM 
AUTH LOGIN
334 VXNlcm5hbWU6
bWFpbGluZ2xpc3QuYXppZW5kYWxlQGdtYWlsLmNvbQ==
334 UGFzc3dvcmQ6
bWFpbGluZzIwMTA=
235 2.7.0 Accepted
DEBUG SMTP: use8bit false
MAIL FROM:<ma...@gmail.com>
250 2.1.0 OK w43sm11803585eeh.3
RCPT TO:<sp...@libero.it>
250 2.1.5 OK w43sm11803585eeh.3
DEBUG SMTP: Verified Addresses
DEBUG SMTP:   spatca@libero.it
DATA
354  Go ahead w43sm11803585eeh.3
Date: Thu, 1 Jul 2010 19:07:08 +0200 (CEST)
From: mailinglist.aziendale@gmail.com
To: spatca@libero.it
Message-ID: <69...@linux-go02>
Subject: email aziendale
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

ciao come va? todo bien? grazie
.
250 2.0.0 OK 1278004034 w43sm11803585eeh.3
QUIT
221 2.0.0 closing connection w43sm11803585eeh.3
OK

webservice on servicemix:
Loading javamail.default.providers from
jar:file:/root/.m2/repository/javaMail/mail/1.4.3/mail-1.4.3.jar!/META-INF/javamail.default.providers                 
DEBUG: loading new provider protocol=imap,
className=com.sun.mail.imap.IMAPStore, vendor=Sun Microsystems, Inc,
version=null                                  
DEBUG: loading new provider protocol=imaps,
className=com.sun.mail.imap.IMAPSSLStore, vendor=Sun Microsystems, Inc,
version=null                              
DEBUG: loading new provider protocol=smtp,
className=com.sun.mail.smtp.SMTPTransport, vendor=Sun Microsystems, Inc,
version=null                              
DEBUG: loading new provider protocol=smtps,
className=com.sun.mail.smtp.SMTPSSLTransport, vendor=Sun Microsystems, Inc,
version=null                          
DEBUG: loading new provider protocol=pop3,
className=com.sun.mail.pop3.POP3Store, vendor=Sun Microsystems, Inc,
version=null                                  
DEBUG: loading new provider protocol=pop3s,
className=com.sun.mail.pop3.POP3SSLStore, vendor=Sun Microsystems, Inc,
version=null                              
DEBUG: getProvider() returning provider protocol=smtp;
type=javax.mail.Provider$Type@759c1f49;
class=com.sun.mail.smtp.SMTPTransport; vendor=Sun Microsystems, Inc                    
DEBUG SMTP: useEhlo true, useAuth false                                        
DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false        
220 linux-go02.site ESMTP Postfix                                              
DEBUG SMTP: connected to host "localhost", port: 25                            

EHLO linux-go02.site
250-linux-go02.site 
250-PIPELINING      
250-SIZE            
250-VRFY            
250-ETRN            
250-ENHANCEDSTATUSCODES
250-8BITMIME           
250 DSN                
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "SIZE", arg ""      
DEBUG SMTP: Found extension "VRFY", arg ""      
DEBUG SMTP: Found extension "ETRN", arg ""      
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""           
DEBUG SMTP: Found extension "DSN", arg ""                
DEBUG SMTP: use8bit false                                
MAIL FROM:<ma...@gmail.com>              
250 2.1.0 Ok                                             
RCPT TO:<sp...@libero.it>                               
250 2.1.5 Ok                                             
DEBUG SMTP: Verified Addresses                           
DEBUG SMTP:   spatca@libero.it                           
DATA                                                     
354 End data with <CR><LF>.<CR><LF>                      
Date: Thu, 1 Jul 2010 19:13:07 +0200                     
From: mailinglist.aziendale@gmail.com                    
To: spatca@libero.it                                     
Subject: email aziendale                                 
MIME-Version: 1.0                                        
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8

ciao ti =C3=A8 arrivata l'email? o no?
.
250 2.0.0 Ok: queued as 3970010257
QUIT
221 2.0.0 Bye
OK
1-lug-2010 19.13.08
org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
INFO: Outbound Message
---------------------------
Encoding: UTF-8
Headers:
Messages:
Payload: <jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://mailSender.samples.servicemix.apache.org/"
type="msg:sendEmailResponse"><jbi:part><ns2:sendEmailResponse
xmlns:ns2="http://mailSender.samples.servicemix.apache.org/"
/></jbi:part></jbi:message>
--------------------------------------

my code is:
@SuppressWarnings("restriction")
@WebService(targetNamespace
="http://mailSender.samples.servicemix.apache.org/",
serviceName="mailSendService" ,
endpointInterface="org.apache.servicemix.samples.mailSender.mailSend")

public class mailSendImpl implements mailSend {
	
	
	
	
	public mailSendImpl() {
		super();
		// TODO Auto-generated constructor stub
	}

	public void sendEmail(String testo, String dest){
		   
		
		 try {
			 Authenticator auth = new SMTPAuthenticator();
     
			   // Properties props = System.getProperties();
			 Properties props = new Properties();
			    props.put( "mail.smtp.host", "smtp.gmail.com" );
			    props.put("mail.smtp.starttls.enable","true");
			    props.put("mail.smtp.auth", "true");
			    

			    //Session session = Session.getDefaultInstance( props, auth );
			    Session session = Session.getInstance(props, auth);
			    session.setDebug(true);
			  
			    Message message = new MimeMessage( session );

			    InternetAddress from = new InternetAddress(
"mailinglist.aziendale@gmail.com" );
			    InternetAddress to[] = InternetAddress.parse( dest );

			    message.setFrom( from );
			    message.setRecipients( Message.RecipientType.TO, to );
			    message.setSubject( "email aziendale" );
			    message.setSentDate( new Date() );
			    message.setText( testo );
			  
			  
			 
			    Transport.send(message);
			    
			    
			    System.out.println("OK");
			    } catch(MessagingException e) {
			      e.printStackTrace();
			    }
		
		
		
	}
	
}

How i can do to risolve this problem?



-- 
View this message in context: http://servicemix.396122.n5.nabble.com/mail-marshaller-deployment-problems-tp511299p512440.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: mail marshaller deployment problems

Posted by zaone84 <sp...@libero.it>.
Hi, can you show me as the message in myinbox must be to be anderstood by the
DefaultMailMarshaller?
thanks!
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/mail-marshaller-deployment-problems-tp511299p512344.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: mail marshaller deployment problems

Posted by Javier Arias <xa...@yahoo.com>.
Hi, 
this exception is thrown when you do not have connection to the server through that port. 
First you should fix this (I usually, try an email client with the same setting you are using in your mail su, or make a telnet over the appropiate port to be sure you can open a connection).
Second, a parse exception means that probably your xml is not correct, an easy way to validate it may be trying to open it with an internet browser.
Hope this helps keep me posted.
BR.




________________________________
From: zaone84 <sp...@libero.it>
To: users@servicemix.apache.org
Sent: Thu, July 1, 2010 11:10:03 AM
Subject: Re: mail marshaller deployment problems


I have created also a file poller to google-mail account but, this does not
work i see in the servicemix window socket timeout:
ERROR - MailComponent                  - Caught exception while polling:
javax.mail.MessagingException: connect timed out;                                    
  nested exception is:                                                        
        java.net.SocketTimeoutException: connect timed out                    
javax.mail.MessagingException: connect timed out;                              
  nested exception is:                                                        
        java.net.SocketTimeoutException: connect timed out                    
        at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:479)    
        at javax.mail.Service.connect(Service.java:275)                        
        at javax.mail.Service.connect(Service.java:156)                        
        at
org.apache.servicemix.mail.MailPollerEndpoint.poll(MailPollerEndpoint.java:192)                                                                    
        at
org.apache.servicemix.common.endpoints.PollingEndpoint$PollSchedulerTask$1.run(PollingEndpoint.java:202)                                          
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)                                                                    
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)                                                                    
        at java.lang.Thread.run(Thread.java:636)                              
Caused by: java.net.SocketTimeoutException: connect timed out                  
        at java.net.PlainSocketImpl.socketConnect(Native Method)              
        at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)                                                                      
        at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)                                                                
        at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)                                                                        
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)          
        at java.net.Socket.connect(Socket.java:542)                            
        at
com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:230)
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)  
        at com.sun.mail.iap.Protocol.<init>(Protocol.java:84)                  
        at
com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:87)
        at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:446)    
        ... 7 more                                                            
ERROR - MailComponent                  - Caught exception while polling:
javax.mail.MessagingException: connect timed out;                                    
  nested exception is:                                                        
        java.net.SocketTimeoutException: connect timed out                    
javax.mail.MessagingException: connect timed out;                              
  nested exception is:                                                        
        java.net.SocketTimeoutException: connect timed out                    
        at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:479)    
        at javax.mail.Service.connect(Service.java:275)                        
        at javax.mail.Service.connect(Service.java:156)                        
        at
org.apache.servicemix.mail.MailPollerEndpoint.poll(MailPollerEndpoint.java:192)                                                                    
        at
org.apache.servicemix.common.endpoints.PollingEndpoint$PollSchedulerTask$1.run(PollingEndpoint.java:202)                                          
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
        at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
        at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:542)
        at
com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:230)
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
        at com.sun.mail.iap.Protocol.<init>(Protocol.java:84)
        at
com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:87)
        at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:446)
        ... 7 more

my mail poller is this:
<mail:poller service="ms:mailService" 
                 endpoint="pollerEndpoint" 
                 targetService="ms:mailProcessingService"
                 period="10000"
                 debugMode="false"
                
connection="imap://mailinglist.aziendale@google.com:993/?password=passwd"
                 deleteProcessedMessages="false"
                 processOnlyUnseenMessages="true" /> 



hi have changed provider using other account mail, or or pop3 protocol but
the result it's the same!
There is a problem with the servicemix-mail 2009.01? Beacause i have
servicemix 3.3.1 with this servicemix-mail's version.
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/mail-marshaller-deployment-problems-tp511299p512323.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.



      

Re: mail marshaller deployment problems

Posted by zaone84 <sp...@libero.it>.
I have created also a file poller to google-mail account but, this does not
work i see in the servicemix window socket timeout:
ERROR - MailComponent                  - Caught exception while polling:
javax.mail.MessagingException: connect timed out;                                    
  nested exception is:                                                         
        java.net.SocketTimeoutException: connect timed out                     
javax.mail.MessagingException: connect timed out;                              
  nested exception is:                                                         
        java.net.SocketTimeoutException: connect timed out                     
        at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:479)     
        at javax.mail.Service.connect(Service.java:275)                        
        at javax.mail.Service.connect(Service.java:156)                        
        at
org.apache.servicemix.mail.MailPollerEndpoint.poll(MailPollerEndpoint.java:192)                                                                    
        at
org.apache.servicemix.common.endpoints.PollingEndpoint$PollSchedulerTask$1.run(PollingEndpoint.java:202)                                           
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)                                                                    
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)                                                                    
        at java.lang.Thread.run(Thread.java:636)                               
Caused by: java.net.SocketTimeoutException: connect timed out                  
        at java.net.PlainSocketImpl.socketConnect(Native Method)               
        at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)                                                                       
        at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)                                                                
        at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)                                                                         
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)          
        at java.net.Socket.connect(Socket.java:542)                            
        at
com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:230)
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)   
        at com.sun.mail.iap.Protocol.<init>(Protocol.java:84)                  
        at
com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:87)
        at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:446)     
        ... 7 more                                                             
ERROR - MailComponent                  - Caught exception while polling:
javax.mail.MessagingException: connect timed out;                                    
  nested exception is:                                                         
        java.net.SocketTimeoutException: connect timed out                     
javax.mail.MessagingException: connect timed out;                              
  nested exception is:                                                         
        java.net.SocketTimeoutException: connect timed out                     
        at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:479)     
        at javax.mail.Service.connect(Service.java:275)                        
        at javax.mail.Service.connect(Service.java:156)                        
        at
org.apache.servicemix.mail.MailPollerEndpoint.poll(MailPollerEndpoint.java:192)                                                                    
        at
org.apache.servicemix.common.endpoints.PollingEndpoint$PollSchedulerTask$1.run(PollingEndpoint.java:202)                                           
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
        at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
        at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:542)
        at
com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:230)
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
        at com.sun.mail.iap.Protocol.<init>(Protocol.java:84)
        at
com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:87)
        at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:446)
        ... 7 more

my mail poller is this:
<mail:poller service="ms:mailService" 
                 endpoint="pollerEndpoint" 
                 targetService="ms:mailProcessingService"
                 period="10000"
                 debugMode="false"
                
connection="imap://mailinglist.aziendale@google.com:993/?password=passwd"
                 deleteProcessedMessages="false"
                 processOnlyUnseenMessages="true" /> 



hi have changed provider using other account mail, or or pop3 protocol but
the result it's the same!
There is a problem with the servicemix-mail 2009.01? Beacause i have
servicemix 3.3.1 with this servicemix-mail's version.
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/mail-marshaller-deployment-problems-tp511299p512323.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: mail marshaller deployment problems

Posted by zaone84 <sp...@libero.it>.
Hi, thanks for your answere, my problem is this, i don't know in what format
this file must be, to avoid the implementation of a particular file
marshaller, or if i must do this, how i can create a file marshaller!?

As first test, i do a file-poller that keep a file and send this to a
default email, but it does not work, i put in myinbox folder a simple file
xml, but i receive xmlparser errors, hence i think that i don't know the
default message format that the mail sender expect!


here is my mail sender xbean file:
<beans xmlns:mail="http://servicemix.apache.org/mail/1.0"
       xmlns:ms="http://servicemix.apache.org/mailSender"
       xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://servicemix.apache.org/mail/1.0
http://servicemix.apache.org/schema/servicemix-mail-2009.01.xsd
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
       
  

    <mail:sender service="ms:mailService" 
                 endpoint="senderEndpoint"
                 sender="mailinglist.aziendale@google.com"
                 receiver="example@google.com"
                 debugMode="false" 
                
connection="smtp://webmaster@dangerousnet.com?password=passwd"/>                 
</beans>

and here is my file poller:

 <beans xmlns:file="http://servicemix.apache.org/file/1.0"
       xmlns:tut="urn:servicemix:tutorial"
       xmlns:ms="http://servicemix.apache.org/mailSender">
  <file:poller service="tut:file" 
             endpoint="poller"
             file="file:/home/zaxroot/myInbox" 
             targetService="ms:mailService"
             targetEndpoint="senderEndpoint"/>
 
</beans>

-- 
View this message in context: http://servicemix.396122.n5.nabble.com/mail-marshaller-deployment-problems-tp511299p512310.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.