By Bill Talamo 8 years ago

    A "read --detach-file"  only works if the target email is the very 1st in my inbox.  

    Is this expected ?  is there a parameter I need to add ?

    • Re: READ --DETACH

      By Sami Salkosuo 8 years ago

      Yes, that's correct. Using just read-command reads only the latest mail in inbox. You need to use today, list or search commands to list more mails.

      Below are examples of commands to read and detach attachments in mails.

      Read all today's mail and detach all attachments:

      clenotes today --read=* --detach-all

      Search mail for specific text and detach all attachments:

      clenotes search --fulltext=mysearchstring --read=* --detach-all

      List all mail in database and detach attachments:

      clenotes list --read=* --detach-all

      • By Bill Talamo 7 years ago

        Hi Sami, installing SEP v12 “broke” CLENotes so instead of removing the new SEP I upgraded to CLENotes 5.0.1.
        Following your response to this question I had changed my detach to:
        –password=xxxxx today –read=* –detach-file=xyz.txt –body=” "
        and I was able to pull the xyz file from anywhere in my inbox.
        After moving to 5.0.1 this fails with
        Saving attachments from…
        Exception in thread “CLENotesThreadRunnable” java.lang.NullPointerException

            at clenotes.utils.DominoUtils.getFormattedMail(DominoUtils.java:967)
            at clenotes.utils.DominoUtils.getAttachmentNames(DominoUtils.java:545)
            at clenotes.commands.ReadMail.readMail(ReadMail.java:141)
            at clenotes.commands.Today.execute(Today.java:67)
            at clenotes.CLENotes.run(CLENotes.java:87)
            at lotus.domino.NotesThread.run(Unknown Source)

        So I changed back to :
        –password=xxxxx read –detach-file=xyz.txt –body=” "
        and it works but only if the email is at the top of my inbox, so I'm back to where I was when I started this thread. Any ideas ?

        • By Sami Salkosuo 7 years ago


          In v5.0.1 today-command returns all documents of today, not only emails. Some of those documents may not be received emails and so they may not have “DeliveredDate” field available. That is causing the NullPointerException.

          I have fixed this in v5.0.2 so that today-command returns only emails (to be precise, those documents that has Form either Memo or Reply and sender in not the current user).

          I will send new version for review today and it should be released soon after it's been approved.