Hi David,

it would be highly appreciated to keep us in the loop ... :-)

Thanks in advance

Siegfried Goeschl

On 02.04.13 05:52, David Hoffer wrote:
But I'm quite sure email.send() is only being called once...as I log
each of those calls.  It's that the one send() call ends up sending two
emails.  The duplicate emails seems related to the two email recipients
  I'm going to try building a separate email for each recipient and see
how that goes.

The one other strange thing that is happening...and now I wonder if they
are related.  In my main logic I move emails from Inbox to another
folder.  I call message.setFlag(DELETED, true) after the copy to remove
from the Inbox (the remove actually happens later when inbox.close(true)
is called.  However for some reason now message.setFlag(DELETED, true)
often will throw a MessageRemovedException.  However I have no idea why
it would throw this as it's a new message that was just read and it's
the first time the DELETED flag was set and inbox.close(true) has not
been called yet.

Both of these issues started at about the same time.  Both are
unexpected/unexplained.

-Dave


On Mon, Apr 1, 2013 at 12:42 PM, Siegfried Goeschl <[email protected]
<mailto:[email protected]>> wrote:

    Indeed I do ... :-) ... Email.send() returns the msg id

    Cheers,

    Siegfried Goeschl



    On 01.04.13 19:12, David Hoffer wrote:

        Do you know the API to get that ID?  I'd like to add that to the
        logs.

        -Dave


        On Mon, Apr 1, 2013 at 11:03 AM, Siegfried Goeschl
        <[email protected] <mailto:[email protected]>> wrote:

            Hi folks,

            log seems okay - a few hints

            A hint every message constructed by the mail api has a
            unique mail id (if
            not overwritten by the application)  - if your duplicates
            have different
            mail ids then the application sent indeed two emails

            Cheers,

            Siegfried Goeschl


            On 30.03.13 07:43, Maurizio Cucchiara wrote:

                Looking at the log, seems everything right to me.

                Anyway, when I face this kind of trouble (SMTP protocol
                is a strange beast
                :)), my best friend is tcpdump/wireshark.
                Tcpdump will address you to the side where you have to
                investigate.


                Twitter     :http://www.twitter.com/m_**__cucchiara
                
<http://www.twitter.com/m_**cucchiara><http://www.twitter.__com/m_cucchiara
                <http://www.twitter.com/m_cucchiara>>
                G+
                  :https://plus.google.com/**__107903711540963855921
                
<https://plus.google.com/**107903711540963855921><https://__plus.google.com/__107903711540963855921
                <https://plus.google.com/107903711540963855921>>
                Linkedin
                  :http://www.linkedin.com/in/**__mauriziocucchiara
                
<http://www.linkedin.com/in/**mauriziocucchiara><http://www.__linkedin.com/in/__mauriziocucchiara
                <http://www.linkedin.com/in/mauriziocucchiara>>
                VisualizeMe: http://vizualize.me/maurizio.*__*
                <http://vizualize.me/maurizio.**>
                
cucchiara?r=maurizio.__cucchiara<http://vizualize.me/__maurizio.cucchiara?r=maurizio.__cucchiara
                <http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara>>


                Maurizio Cucchiara


                On 30 March 2013 01:48, David Hoffer <[email protected]
                <mailto:[email protected]>> wrote:

                   I was able to redirect the system outputs to the log
                file...just easier

                    that way for me.  Here is what's in the log file
                    (with some email
                    addresses
                    mods to protect the innocent):

                    2013-03-30 00:30:49,524 [main] INFO  SYSOUT - DEBUG:
                    JavaMail version
                    1.4.4
                    2013-03-30 00:30:49,533 [main] INFO  SYSOUT - DEBUG:
                    successfully loaded
                    resource: /META-INF/javamail.default.**__providers

                    2013-03-30 00:30:49,533 [main] INFO  SYSOUT - DEBUG:
                    Tables of loaded
                    providers
                    2013-03-30 00:30:49,533 [main] INFO  SYSOUT - DEBUG:
                    Providers Listed By
                    Class Name:

                    {com.sun.mail.smtp.**__SMTPSSLTransport=javax.mail.**
                    
Provider[TRANSPORT,smtps,com.*__*sun.mail.smtp.**__SMTPSSLTransport,Sun
                    Microsystems, Inc],

                    com.sun.mail.smtp.**__SMTPTransport=javax.mail.**
                    
Provider[TRANSPORT,smtp,com.**__sun.mail.smtp.SMTPTransport,**__Sun
                    Microsystems, Inc],

                    com.sun.mail.imap.**__IMAPSSLStore=javax.mail.**
                    Provider[STORE,imaps,com.sun.*__*mail.imap.IMAPSSLStore,Sun
                    Microsystems, Inc],

                    com.sun.mail.pop3.**__POP3SSLStore=javax.mail.**
                    Provider[STORE,pop3s,com.sun.*__*mail.pop3.POP3SSLStore,Sun
                    Microsystems, Inc],

                    com.sun.mail.imap.IMAPStore=**__javax.mail.Provider[STORE,**
                    imap,com.sun.mail.imap.**__IMAPStore,Sun
                    Microsystems, Inc],

                    com.sun.mail.pop3.POP3Store=**__javax.mail.Provider[STORE,**
                    pop3,com.sun.mail.pop3.**__POP3Store,Sun

                    Microsystems, Inc]}
                    2013-03-30 00:30:49,533 [main] INFO  SYSOUT - DEBUG:
                    Providers Listed By
                    Protocol:
                    
{imaps=javax.mail.Provider[**__STORE,imaps,com.sun.mail.imap.__**
                    IMAPSSLStore,Sun
                    Microsystems, Inc],
                    
imap=javax.mail.Provider[**__STORE,imap,com.sun.mail.imap.*__*IMAPStore,Sun
                    Microsystems, Inc],

                    
smtps=javax.mail.Provider[**__TRANSPORT,smtps,com.sun.mail.*__*
                    smtp.SMTPSSLTransport,Sun
                    Microsystems, Inc],
                    
pop3=javax.mail.Provider[**__STORE,pop3,com.sun.mail.pop3.*__*POP3Store,Sun
                    Microsystems, Inc],
                    
pop3s=javax.mail.Provider[**__STORE,pop3s,com.sun.mail.pop3.__**
                    POP3SSLStore,Sun
                    Microsystems, Inc],
                    smtp=javax.mail.Provider[**__TRANSPORT,smtp,com.sun.mail.**

                    smtp.SMTPTransport,Sun
                    Microsystems, Inc]}
                    2013-03-30 00:30:49,533 [main] INFO  SYSOUT - DEBUG:
                    successfully loaded
                    resource: /META-INF/javamail.default.**__address.map

                    2013-03-30 00:30:49,543 [main] INFO  SYSOUT - DEBUG:
                    getProvider()
                    returning
                    javax.mail.Provider[TRANSPORT,__**smtp,com.sun.mail.smtp.**

                    SMTPTransport,Sun
                    Microsystems, Inc]
                    2013-03-30 00:30:49,543 [main] INFO  SYSOUT - DEBUG
                    SMTP: useEhlo true,
                    useAuth true
                    2013-03-30 00:30:49,543 [main] INFO  SYSOUT - DEBUG
                    SMTP: useEhlo true,
                    useAuth true
                    2013-03-30 00:30:49,543 [main] INFO  SYSOUT - DEBUG
                    SMTP: trying to
                    connect
                    to host "smtp.gmail.com <http://smtp.gmail.com>",
                    port 587, isSSL false
                    2013-03-30 00:30:49,567 [main] INFO  SYSOUT - 220
                    mx.google.com <http://mx.google.com> ESMTP
                    dt10sm10366067qab.0 - gsmtp

                    2013-03-30 00:30:49,567 [main] INFO  SYSOUT - DEBUG
                    SMTP: connected to
                    host
                    "smtp.gmail.com <http://smtp.gmail.com>", port: 587

                    2013-03-30 00:30:49,567 [main] INFO  SYSOUT - EHLO
                    ip-10-144-154-209.ec2.internal

                    2013-03-30 00:30:49,585 [main] INFO  SYSOUT -
                    250-mx.google.com <http://250-mx.google.com> at your
                    service, [23.23.77.108]
                    250-SIZE 35882577
                    250-8BITMIME
                    250-STARTTLS
                    250 ENHANCEDSTATUSCODES

                    2013-03-30 00:30:49,585 [main] INFO  SYSOUT - DEBUG
                    SMTP: Found extension
                    "SIZE", arg "35882577"
                    2013-03-30 00:30:49,585 [main] INFO  SYSOUT - DEBUG
                    SMTP: Found extension
                    "8BITMIME", arg ""
                    2013-03-30 00:30:49,585 [main] INFO  SYSOUT - DEBUG
                    SMTP: Found extension
                    "STARTTLS", arg ""
                    2013-03-30 00:30:49,585 [main] INFO  SYSOUT - DEBUG
                    SMTP: Found extension
                    "ENHANCEDSTATUSCODES", arg ""
                    2013-03-30 00:30:49,585 [main] INFO  SYSOUT - STARTTLS

                    2013-03-30 00:30:49,596 [main] INFO  SYSOUT - 220
                    2.0.0 Ready to start
                    TLS

                    2013-03-30 00:30:49,680 [main] INFO  SYSOUT - EHLO
                    ip-10-144-154-209.ec2.internal

                    2013-03-30 00:30:49,691 [main] INFO  SYSOUT -
                    250-mx.google.com <http://250-mx.google.com> at your
                    service, [23.23.77.108]
                    250-SIZE 35882577
                    250-8BITMIME
                    250-AUTH LOGIN PLAIN XOAUTH XOAUTH2
                    250 ENHANCEDSTATUSCODES

                    2013-03-30 00:30:49,691 [main] INFO  SYSOUT - DEBUG
                    SMTP: Found extension
                    "SIZE", arg "35882577"
                    2013-03-30 00:30:49,691 [main] INFO  SYSOUT - DEBUG
                    SMTP: Found extension
                    "8BITMIME", arg ""
                    2013-03-30 00:30:49,691 [main] INFO  SYSOUT - DEBUG
                    SMTP: Found extension
                    "AUTH", arg "LOGIN PLAIN XOAUTH XOAUTH2"
                    2013-03-30 00:30:49,691 [main] INFO  SYSOUT - DEBUG
                    SMTP: Found extension
                    "ENHANCEDSTATUSCODES", arg ""
                    2013-03-30 00:30:49,691 [main] INFO  SYSOUT - DEBUG
                    SMTP: Attempt to
                    authenticate
                    2013-03-30 00:30:49,692 [main] INFO  SYSOUT - DEBUG
                    SMTP: check
                    mechanisms:
                    LOGIN PLAIN DIGEST-MD5 NTLM
                    2013-03-30 00:30:49,692 [main] INFO  SYSOUT - AUTH LOGIN

                    2013-03-30 00:30:49,703 [main] INFO  SYSOUT - 334
                    VXNlcm5hbWU6

                    2013-03-30 00:30:49,703 [main] INFO  SYSOUT -
                    bGVhZHNAa2V5c3RvbmVmdW5kaW5nLm__**NvbQ==


                    2013-03-30 00:30:49,715 [main] INFO  SYSOUT - 334
                    UGFzc3dvcmQ6

                    2013-03-30 00:30:49,715 [main] INFO  SYSOUT -
                    bGVhZHMyMDEy

                    2013-03-30 00:30:49,968 [main] INFO  SYSOUT - 235
                    2.7.0 Accepted

                    2013-03-30 00:30:49,968 [main] INFO  SYSOUT - DEBUG
                    SMTP: use8bit false
                    2013-03-30 00:30:49,968 [main] INFO  SYSOUT - MAIL
                    FROM:<
                    [email protected] <mailto:[email protected]>>

                    2013-03-30 00:30:49,980 [main] INFO  SYSOUT - 250
                    2.1.0 OK
                    dt10sm10366067qab.0 - gsmtp

                    2013-03-30 00:30:49,980 [main] INFO  SYSOUT - RCPT TO:<
                    [email protected] <mailto:[email protected]>>

                    2013-03-30 00:30:49,992 [main] INFO  SYSOUT - 250
                    2.1.5 OK
                    dt10sm10366067qab.0 - gsmtp

                    2013-03-30 00:30:49,992 [main] INFO  SYSOUT - RCPT
                    TO:<[email protected] <mailto:[email protected]>>

                    2013-03-30 00:30:50,003 [main] INFO  SYSOUT - 250
                    2.1.5 OK
                    dt10sm10366067qab.0 - gsmtp

                    2013-03-30 00:30:50,003 [main] INFO  SYSOUT - DEBUG
                    SMTP: Verified
                    Addresses
                    2013-03-30 00:30:50,003 [main] INFO  SYSOUT - DEBUG
                    SMTP:   jmartin <
                    [email protected] <mailto:[email protected]>>
                    2013-03-30 00:30:50,004 [main] INFO  SYSOUT - DEBUG
                    SMTP:   dave <
                    [email protected] <mailto:[email protected]>>
                    2013-03-30 00:30:50,004 [main] INFO  SYSOUT - DATA

                    2013-03-30 00:30:50,268 [main] INFO  SYSOUT - 354
                      Go ahead
                    dt10sm10366067qab.0 - gsmtp

                    2013-03-30 00:30:50,269 [main] INFO  SYSOUT - Date:
                    Sat, 30 Mar 2013
                    00:30:49 +0000 (UTC)
                    From: [email protected] <mailto:[email protected]>
                    To: jmartin <[email protected]
                    <mailto:[email protected]>>, dave <[email protected]
                    <mailto:[email protected]>>
                    Message-ID:
                    
<2143726487.2.1364603449543.**__JavaMail.stonedev@ip-10-144-**

                    154-209


                           Subject: Report [3/29/13]

                    MIME-Version: 1.0
                    Content-Type: text/plain; charset=us-ascii
                    Content-Transfer-Encoding: 7bit


                    -----------------------------
                    Email Body
                    -----------------------------
                    .

                    2013-03-30 00:30:50,831 [main] INFO  SYSOUT - 250
                    2.0.0 OK 1364603273
                    dt10sm10366067qab.0 - gsmtp

                    2013-03-30 00:30:50,832 [main] INFO  SYSOUT - QUIT

                    2013-03-30 00:30:50,843 [main] INFO  SYSOUT - 221
                    2.0.0 closing
                    connection
                    dt10sm10366067qab.0 - gsmtp


                    On Fri, Mar 29, 2013 at 1:43 PM, Maurizio Cucchiara
                    <[email protected]
                    <mailto:[email protected]>>wrote:

                       if you want obtain the system.out from a
                    scheduled job, you can redirect

                        the output on a file:

                        for example:

                        scheduled_job > /tmp/out.txt

                        Twitter
                        :http://www.twitter.com/m_**__cucchiara
                        
<http://www.twitter.com/m_**cucchiara><http://www.twitter.__com/m_cucchiara
                        <http://www.twitter.com/m_cucchiara>>
                        G+
                          :https://plus.google.com/**__107903711540963855921 
<https://plus.google.com/**107903711540963855921><https://__plus.google.com/__107903711540963855921
 <https://plus.google.com/107903711540963855921>>
                        Linkedin
                          :http://www.linkedin.com/in/**__mauriziocucchiara 
<http://www.linkedin.com/in/**mauriziocucchiara><http://www.__linkedin.com/in/__mauriziocucchiara
 <http://www.linkedin.com/in/mauriziocucchiara>>
                        VisualizeMe: http://vizualize.me/maurizio.*__*
                        <http://vizualize.me/maurizio.**>
                        
cucchiara?r=maurizio.__cucchiara<http://vizualize.me/__maurizio.cucchiara?r=maurizio.__cucchiara
                        
<http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara>>


                        Maurizio Cucchiara


                        On 29 March 2013 20:30, David Hoffer
                        <[email protected] <mailto:[email protected]>>
                        wrote:

                           This runs as a cron job...so no console is
                        used.  Not sure then how to


                        get

                            the debug info...may have to reconfigure to
                            run in console.  Perhaps I

                        can

                            configure log4j to redirect System.out and
                            System.err...I'll check

                        that.



                            -Dave


                            On Fri, Mar 29, 2013 at 12:34 PM, Thomas
                            Neidhart <
                            [email protected]
                            <mailto:[email protected]>

                                wrote:


                               On 03/29/2013 01:32 PM, David Hoffer wrote:


                                    Hum, I set setDebug(true) but I'm
                                    not seeing more info the

                                logs...and


                        logging is set to DEBUG level.  How do I
                        configure this so the


                                debug


                        goes


                                to the log?



                                the debug output will go to System.out
                                or System.err, so you will not
                                find it in the output of your logging
                                provider.

                                Thomas

                                
------------------------------__**----------------------------__--**
                                ---------
                                To unsubscribe, e-mail:
                                user-unsubscribe@commons.**apa__che.org
                                
<http://apache.org><user-unsubscribe@__commons.apache.org
                                <mailto:[email protected]>>

                                For additional commands, e-mail:
                                [email protected]
                                <mailto:[email protected]>







            
------------------------------__**----------------------------__--**---------
            To unsubscribe, e-mail:
            user-unsubscribe@commons.**apa__che.org
            <http://apache.org><user-unsubscribe@__commons.apache.org
            <mailto:[email protected]>>

            For additional commands, e-mail:
            [email protected]
            <mailto:[email protected]>




    ------------------------------__------------------------------__---------
    To unsubscribe, e-mail: user-unsubscribe@commons.__apache.org
    <mailto:[email protected]>
    For additional commands, e-mail: [email protected]
    <mailto:[email protected]>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to