• attached file problem

    By micro sam 1 decade ago

     

    Hi</div>
    
    Great job,</div>
    
    I installed 1.2 correctly , but attached file did not come in draft email,</div>
    
    tested on 8.5 and 7.3, both of them had that problem.</div>
    
    it show the link to file which is written in excel file.</div>
    
    thanks in advance. &nbsp;</div>
    
    &nbsp;</div>
    
    &nbsp;</div>
    
    Excel:</div>
    
    &nbsp;</div>
    
    To Cc Subject Attachments NAME BODY1 BODY2 BODY3 BODY4 SIGN</div>
    
    microsam1@gmail.com your account C:\temp\*.log micro sam hello world 1990 12/2/2011 B12B34 microsam</div>
    
    &nbsp;</div>
    
    &nbsp;</div>
    
    &nbsp;</div>
    
    Lotus Notes:</div>
    
    &nbsp;</div>
    
    Dear [NAME],</div>
    
    [BODY1]</div>
    
    you have &nbsp;[BODY2] overdue &nbsp;since [BODY3] from account number: [BODY4]</div>
    
    &nbsp;</div>
    
    [SIGN]</div>
    
    regards</div>
    
    [ATTACHMENTS]</div>
    
    &nbsp;</div>
    
    &nbsp;</div>
    
    &nbsp;</div>
    
    &nbsp;</div>
    
    in draft came:</div>
    
    &nbsp;</div>
    
    Dear micro sam,</div>
    
    hello world</div>
    
    you have &nbsp;1990 overdue &nbsp;since 12/2/2011 from account number: B12B34</div>
    
    &nbsp;</div>
    
    microsam</div>
    
    regards</div>
    
    C:\temp\*.log</div>
    
    C:\temp\*.logHi
    
    Great job,
    
    I installed 1.2 correctly , but attached file did not come in draft email,
    
    tested on 8.5 and 7.3, both of them had that problem.
    
    it show the link to file which is written in excel file.
    
    thanks in advance. &nbsp;
    
    &nbsp;
    
    &nbsp;
    
    Excel:
    
    &nbsp;
    
    To Cc Subject Attachments NAME BODY1 BODY2 BODY3 BODY4 SIGN
    
    microsam1@gmail.com your account C:\temp\*.log micro sam hello world 1990 12/2/2011 B12B34 microsam
    
    &nbsp;
    
    &nbsp;
    
    &nbsp;
    
    Lotus Notes:
    
    &nbsp;
    
    Dear [NAME],
    
    [BODY1]
    
    you have &nbsp;[BODY2] overdue &nbsp;since [BODY3] from account number: [BODY4]
    
    &nbsp;
    
    [SIGN]
    
    regards
    
    &nbsp;
    
    [ATTACHMENTS]
    
    &nbsp;
    
    &nbsp;
    
    in draft came:
    
    &nbsp;
    
    Dear micro sam,
    
    hello world
    
    you have &nbsp;1990 overdue &nbsp;since 12/2/2011 from account number: B12B34
    
    &nbsp;
    
    microsam
    
    regards
    
    &nbsp;
    
    C:\temp\*.log
    
    • Dynamic Attachments 1.2 - Troubleshooting

      By David Turner 1 decade ago

      Hi Sam,

      Thanks for this detailed information.

      The idea behind adding an "Attachments" column to your spreadsheet is simply to provide a mechanism for the addition of attachments on top of the email body. Similar to "To", "Cc" and "Subject", "Attachments" is a special spreadsheet value used by the script so that the files listed can be attached; there is no need to explicitly add an [ATTACHMENTS] token to the email body. I could probably improve the documentation on this, it likely is a little misleading as I whipped it up in a hurry.

      So the results you're seeing is sort-of as expected. As it stands, you've added an [ATTACHMENTS] token to the body of your Notes email template, this would be treated like any other text-based token and replaced with the exact text in that spreadsheet data cell. It is not really intended to be included in the email body like you've done, but you make a good point that that could be improved to display the real filenames which match the wildcard filename expression. I'll investigate making a change to improve that as well (maybe a 1.3 enhancement).

      That said, adding it as a body text token should not affect the designed behaviour, so why are your 'log' file attachments not being attached to your generated emails?

      1. Were you upgrading from release 1.1 or earlier? Please double-check the 'Create Mail Merge' agent you're running is really 1.2. 1.2 would mention the 5 special tokens (including [BCC] and [ATTACHMENTS] tokens) in the opening Help/Notes dialog as it is run.
      2. Check my 1.2 documentation (and the sample image attached to this note) to see what attached files look like in a draft using this script. Its a grey generic-looking document icon, with a filename text next to it; (unfortunately it seems Notes doesn't create a 'skinned' document icon when attaching in this fashion).
      3. You are using C:\temp\*.log. Is there actually any log file in that temp directory? The script will blindly continue without error or warning if the file does not exist, but it just won't add any attachments! <-- I suspect this is most likely your problem.
      4. Does it work with an actual filename in the field instead of a wildcard (asterisk)?
      5. Do you get any error messages from the script?
      6. Instead of the top, can you check the bottom of the email (e.g. below the signature) for attachments in case it appears there?
      7. Do you know if your email is being drafted in Rich-Text or MIME/HTML?
      8. Is there anything else unusual about your PC set up or environment? Is your client and server both Windows? There is some code which uses NotesSession.Platform property to determine the file path separator to use.
      9. Also check that the agent has been signed and that your Notes security (ACL) and Notes Client settings permits access to local system. This is really beyond the scope of my knowledge - better ask a Domino Admin.
      10. Advanced: You might want to enable Tools -> Debug LotusScript. Then run the Create Mail Merge agent again. Double-click on the last line of the 'getFileList' function to add a breakpoint, hit 'Continue' until the breakpoint line is reached, and view the in-memory Variables tab at that point. The FILELIST array should contain the list of expanded existing filenames which will be attached to your email.

       

      Please have a go at this and let me know if you're still having problems. I'll see what else I can think of.


      Regards,

        David

      • Attachments in 1.2

        By micro sam 1 decade ago

         

        thanks for your pro. answer,&nbsp;</div>
        

        I answer some, and will send you later some screen shoot for that.

        &nbsp;</div>
        

        <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-style: inherit; font-size: 12px; font-family: inherit; vertical-align: baseline; ">
        
                Were you upgrading from release 1.1 or earlier? Please double-check the &#39;Create Mail Merge&#39; agent you&#39;re running is really 1.2. 1.2 would mention the 5 special tokens (including [BCC] and [ATTACHMENTS] tokens) in the opening Help/Notes dialog as it is run.</div>
        </li>
        

      • ===== I create local L.notes database based on extended mail R7 template called merge-mail.nsf, then add all 3 agents v.1.2 to that  nsf, with-in this file I did draft with token header, tested to send without attache is fine, its go to sent folder and received by destination person.

      •  

      • You are using C:\temp\*.log. Is there any log file in that temp directory? The script will not error out if the file does not exist, it just won't add any attachments! <-- I suspect this is most likely your problem
      • Does it work with an actual filename in the field instead of a wildcard (asterisk)?
      • ==== tested without [attachments] in body with existing file in c:\temp\test.log
      •  
      • Do you get any error messages from the script?
      • ====no
      •  
      • Instead of the top, can you check the bottom of the email (e.g. below the signature) for attachments in case it appears there?
      • === no not in top nor below.
      •  
      • Do you know if your email is being drafted in Rich-Text or MIME/HTML?
      • ===Notes Rich Text Format
      •  
      • Is there anything else unusual about your PC set up or environment? Is your client and server both Windows? There is some code which uses NotesSession.Platform property to determine the file path separator to use.
      • ===no
      •  
      • Also check that the agent has been signed and that your Notes security (ACL) and Notes Client settings permits access to local system. This is really beyond the scope of my knowledge - better ask a Domino Admin.
      • ===trusted and run fine without attache file.
      •  
      • Advanced: You might want to enable Tools -> Debug LotusScript. Then run the Create Mail Merge agent again. Double-click on the last line of the 'getFileList' function to add a breakpoint, hit 'Continue' until the breakpoint line is reached, and view the in-memory Variables tab at that point. The FILELIST array should contain the list of expanded existing filenames which will be attached to your email.
      • ===will check that.
      •  
  • Attachments Troubleshooting

    By David Turner 1 decade ago

    Okay thanks, let me know how you go with the debugger.

     

    FYI, the 1.2 script currently uses the Dir$() Function to resolve filenames with wildcard (asterisk) support.

     

    A few other things to check:

    • Do you have other directories or files under C:\temp?
    • Check your directory and log file is not a hidden/system file.
    • Check, assuming you are running your Notes client under Windows user account credentials, that user can access the C:/temp directory files (I'm testing as a local admin).

     

    PS: I'm working on MM release 1.3. It includes a function so that adding a [ATTACHMENTS] token to the body will print out the full resolved attachment filenames (comma-separated). I won't release that until I hear back from you, as there might be some more important fixes required to get this working properly!

    • Response: Attachments Troubleshooting 2

      By micro sam 1 decade ago

       

      Hi

      • Do you have other directories or files under C:\temp?
      • ------yes

       

      • Check your directory and log file is not a hidden/system file.
      • ------ .txt or .log  not hidden/system files

       

      • Check, assuming you are running your Notes client under Windows user account credentials, that user can access the C:/temp directory files (I'm testing as a local admin).
      • ------ yes, have all right on system, Domain Admin in Active Directory 

       

      if you want , I can send you my  teamviwer  number and password to control and see in real time my PC.

      again, thanks a lot for support and help.

      • Attachments Troubleshooting

        By David Turner 1 decade ago

        Okay, Adding directories and other files to the dir doesn't seem to be a problem for me, it still works. But I can reproduce this problem if I make the file hidden (I'll improve this in 1.3 to permit hidden/system file attachments); as you've stated, that isn't the problem you're facing.

         

        If you'd like to try a sneak preview of this 1.3 patch, you can modify the line in getFileList function:
                    filename = Dir$(templ)                   'Normal files.

        To
                    filename = Dir$(templ,6)                 'Normal + System + Hidden files.

         

        Further thoughts:

        Perhaps being a log file, it may've been locked for exclusive access? If so, I'm not sure how to overcome that. I'll try to set up something to this effect here and see if it's a problem for me. --- Yes, exclusive locking or security problems is a problem, but these are obvious in that error messages are raised and they prevent the draft from being created at all!

         

        Can you try a more basic test, just a single static text or image file in a folder to try and get something working?

         

        If even that doesn't work, then it may be something different between our environments? I'm currently using a pretty recent 8.5.2FP2 client, with a Notes mail85.ntf template. From a quick read, there are some bugs in the Dir function between Notes versions which could be affecting you.

        • Attachments Troubleshooting 3

          By micro sam 1 decade ago

          Hi David..

          Since I changed to :  filename = Dir$(templ,6)  it is OK now,

          I used another files from another folder in share drive and in my D drive, 

          but before    Dir$(templ,6)   it was unable to bring the same files in same location ,, strange!!!..

          thank you for wonderful project and great support..

           

          if you want to take a look , this is my  .nsf and .xls  files:

          http://sharesend.com/kjtwv

          • Attachments Troubleshooting - Dir$ patch for v1.3

            By David Turner 1 decade ago

            Okay great! Happy to help. Its just fortunate I've got some time to look into this right now. Unfortunately I can't view your files here, but might have a chance to check them out later.

            I'll make that change in release 1.3 and hopefully that'll solve it if anyone else happens to encounter this problem. Stay tuned for that shortly.

            - Dave