Link to home
Start Free TrialLog in
Avatar of SCMGR3
SCMGR3

asked on

Lotus Notes 8 MAILTO attachment missing

I have users of a form that uses MAILTO function to open a note under Lotus Notes with an attachment that contains information to be submitted.  Some users are now migrating to Notes 8 and when the Submit is done on the form, a note is generated under Notes but the attachment (POSTDATA.ATT) is not being generated.  I have tested this on my system with no problem.  The user that is having the problem worked fine with Notes 7.  

The form is an HTML/JavaScript form that runs under IE 6 and Windows XP.  When the submission button is pressed, it invokes a function that contains:
     document.updateForm.action = "mailto:XXXXX@SYSTEM.VNET.XXXXX.COM"  (text for subject, note body, etc.)
     document.updateForm.encoding = "multipart/form-data";
     document.updateForm.method = "POST";

The note is being generated in all cases and the note "to" address, subject and body text are fine.  When it works there is an attachment file as a result of the POST method.  When it does not work, the attachment file is not present.  Other than the missing attachment, everything seems to be the same.

Given that Notes, IW and Windows XP are all involved, the number of options that could be impacting the process is large.  What I am looking for is 1) pointers to any known problems with Notes 8 and attachments, 2) any settings in Notes 8 that could control attachments, or 3) any suggestions on how to go about debugging this.   Is there anyway to trace what is happening in Notes?

Just as an FYI, we have many users on Notes 8 that are not having the problem and just a very few who are.
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Just to clarify:
- you don't use the web-interface of the Domino server, but instead via mailto you activate the Notes-client??
- where and how is the attachment generated? by JavaScript?? or by Notes?

If it's happening to a few users, could they have a different form in their mail database?
Avatar of SCMGR3
SCMGR3

ASKER

The form used is an HTML/JavaScript form that is built and sent to the user to complete.  The user receives an email in thier Notes mail that has the form attached.  They launch the form under Internet Explorer.  They make the desired changes and press a Submit button on the form which invokes the JavaScript function that performs the MAILTO funcion.  With IE options set to speciffy Notes as the email program, this creates a new note in the Notes client that contains the TO address, Note subject and body text as specified in the MAILTO function.  This works on all users.  It should also create an attachment to the generated note as a result of the method = "POST" on the MAILTO function.  This works on all be a few users.  No error indication is given when it does not work.

The form is not in the mail database.  This is not a generic form.  It is built by a mainframe application each month and contains information specific to each project that a person has been assigned.  There is a skeleton HTML/JavaScript form that is completed with the variables and which is then sent to each user for each project as an attachment to a note.  Same basic form but variable data set differently.  I had the person send me a copy of the form she received and ran it with no problems on my system.

The particular user has been part of the process for over a year and was working fine until she got a new system which had Notes 8 installed.  Previously her system had Notes 7.  For some other problems involved this process, we have had luck getting the user to reinstall Notes - my guess is that the something is being set when the new machine is being built that does not occur when we have the person download a new instance of Notes and reinstall.  We have worked several of these cases trying to find a particular setting in Note, IW or XP that is causing the problem by comparing the user's setting to those on our system which does not have the problem.  For the problems with the attachments, we have never found a specific difference.
1) Check the Location doc settings, especially browser
2) compare Notes.ini settings on V8 of a working and non-working machine

3) Check the Browser settings in IE - apps and security

4) Check anti-virus software

5) Use winmsd in report mode to compare a  working and non-working machine.

I hope this helps !
Avatar of SCMGR3

ASKER

Thanks for the ideas.  Yes, this is what will probably have to be done IF (and it is a big IF) we can get a machine configuration that is failing or, if not, we can get a user who will put up with the time to go through all of the many, many settings.  I am dealing with remote users that around the world and there is no way I am getting hold of one of their machines.  The last time I asked to fly to Hong Kong to pick up a failing machine (from New York), management did not have a sense of humor (grin).  These are also people doing a job in the field and when you say I need to schedule an hour or so of you time to debug, the answer is usually not all that polite.  We have in the past on a couple of (different) problems gone through all the the settings with a failing user comparing their settings to our PCs that run and have not been able to find the problem.  Both of these were finally resolved by having the user reinstall Notes.  Unfortunately that did not work this time.

Never the less, I will use the list you provided to see if I can force some setting on my machine to cause the error.  Thanks for taking the time to post it.

To all, it would be nice to know of some tools to debug this environment.  I have tried MS Script Editor and that provides nothing other than the fact that when the window.document.updateForm.submit() function is executed, then the definitions defined during form initialization occur and the new note opens in Notes:

     document.updateForm.action = "mailto:XXXXX@SYSTEM.VNET.XXXXX.COM"  (text for subject, note body, etc.)
     document.updateForm.encoding = "multipart/form-data";
     document.updateForm.method = "POST";

If anyone know of any tools I would appreciate a pointer.  If anyone knows of specific Notes. IE or XP settings that will prevent a file from being built/attached, that would be nice.  Otherwise, it will be the keep turning over rocks to see what crawls out approach to debugging - setting by setting on all options hoping that it is not a combination of settings.  The number of possible permutations would probably be impressive.
Is there any chance that the users for whom it doesn't work have a very long name, or have a lot of data in the mailto? The Notes mailto-url has a rather low size-limit.

I'll try to re-read all your info, it's quite a lot, and it's apparently an intricate system you have.
One more question: what generates the attachment?? is it an external file? or where does it come from??
Avatar of SCMGR3

ASKER

The missing attachment is generated by the HTML form when the user presses the Submit button on the form.  When the user launches the form under IE, the following code is run as part of the form initialization:
document.updateForm.action =                        
"mailto:XSERVX@SERVERID.VNET.XYZZ.COM"                                          +
"?Subject=*XYZZYX CONFIDENTIAL: Project 12345 Forecast Update"  +
"&body=[XYZZYX CONFIDENTIAL]:"                                                                 +
"                  "                                                                                                            +
"In order for your forecast to be updated successfully"                               +
" you will need to SEND this email to XSERVX and "                                   +
"replicate your mail.  "                                                                                         +
"The 'To:' field should be addressed to "                                                       +
"XSERVX@SERVERID.VNET.XYZZ.COM.  There should be an "              +
"attachment with this email.  Do not modify or remove"                             +
" the attachment. "                                                                                              +
"Your forecast data will be processed when this note "                             +
"is received on the SERVERID server.  You will then be "                         +
"sent a  Response  confirmation email from "                                            +
"SERVERID.  "                                                                                                  +
"Until you receive that confirmation email your "                                        +
"forecast update cannot be considered successful.";
document.updateForm.encoding = "multipart/form-data";
document.updateForm.method = "POST";
                       
When the user has filled in the data on the form and presses Submit, the action on the Submit button saves the entered data in fields in a hidden form inside the HTML form and then executes "window.document.updateForm.submit();"
The MAILTO action causes a note to be generated in Notes (which must be defined as the email program in the IE internet Options) with the TO address, subject and body text set as defined above.  The POST method caused the hiddne form to be attached to this note as an attachment (when all goes as it should).  
The original form is built on a mainframe system.  The HTML form is a skeleton that is completed using specific data for the user and a specific project they own.  It is then sent to the user where they receive it in their Notes inbox.  They launch the HTML form that is attached, complete the form, hit the submit butten and then send the resulting note/attachment to back to the mainframe system for processing.  The mainfram application recognizes the incoming file, performs the update using the infomration in the (attached) file, and then sends the user a response email to acknowledge the update.
For whatever reason, there are a few of our thousand plus users where, after migrating to Notes 8, this fails to generate the attachment file.  I have two separate test machines and have been unable to reproduce the condition.  Unfortunately, the users are scattered around the world and travel to the user's site is not possible.   These are also busy people who have a low tolerance for wasting time so asking them to spend long periods on the phone with us is a measure of last resort.
With all of the possible configuration options between Notes, IE, Windows XP and the Norton AV/Firewall software, there are a lot os possiblities plus it could be a combination of settings which makes it even worse to debug.  I have run a trace in the JavaScript on the HTML form and it just confirms that there is nothing unusual in the path followed.  
The user;'s who are failing do not have an unusually long emai address (internet form) and the forms that are used are basically the same except for the specific data related to the project.  At the point of failure, I would have to say it would be realted to the specific configuration on the user's machine, not to any Notes server in the network.  For the one user I am currently working with, there was no problem until she got a new laptop which came preconfigured with Notes 8.  The one it repalced had Notes 7.  The laptops are supplied with a standard company build.
Somewhere in the transition from IE to Notes or in the Notes processing of the MAILTO command, something is causing the attachement file to either not be built or to be discarded.  I keep hoping for some "magic" tool to trace this activity or for someone to have an "eureka" moment and say this option controls the attachment.
Yes, it is a complicated process but when it runs it is great.  When it fails (on the PC side) it is a royal pain to debug.  
Awestruck... I've seen a lot of brilliant code and ideas, but this goes WAY beyond that...

I just checked with a simple editor, and the length of the mailto-text that is created is 660 bytes. The only suggestion I could possibly give is to reduce that length to around 400 bytes, to be on the safe side.

About the mailto size limit:
http://forums.mozillazine.org/viewtopic.php?f=25&t=428680&start=0&st=0&sk=t&sd=a

I suppose Firefox is not company-standard, otherwise you could ask a person with the problem to close IE, install FF as default browser with Notes as default mail client, and try again. Firefox has excellent JavaScript debugging tools.
For older Notes releases, the safe side even seems lower than that: 235...

http://www-01.ibm.com/support/docview.wss?rs=203&uid=swg21094966&loc=en_US&cs=UTF-8&lang=all

In R8, apparently, the limit is much higher, unless you add 800 bytes of address information, the mailto will never surpass the 1500 bytes mentioned. One suggestion down the drain...
Another victim:
http://www.tech-archive.net/Archive/Windows/microsoft.public.windows.inetexplorer.ie6.browser/2005-08/msg01410.html

Mailto is considered "bad" here:
http://www.duffbert.com/duffbert/blog.nsf/d6plinks/TDUF-68S5Z2

Anyway, I use R7.0.3 here, and it seems impossible to create an attachment called POSTDATA.ATT here, not from IE, not from FF, whatever example I use. I suppose it's the way Notes is installed, so maybe I have to reinstall it to get it fixed.

Has that been done already, for those few users in trouble?

Just posting your earlier question, it seems related:
https://www.experts-exchange.com/questions/23989396/Lotus-Notes-empty-email-attachment-created.html
Avatar of SCMGR3

ASKER

Several people have posted concerns with the length of the mailto string.  I have been looking at that concern for at least a couple of years.  It does not seem to apply to what we are doing as the same mailto string is sent to all users and we only see a problem with a very small group.  In the past while working on other problems, I even tried shortening the string to well under any of the limits with no change in behavior.

As for Firefox and other browsers, this is not possible.  The web form we put up has a sliding window inside of a fixed section that was made possible by using some Microsoft only extensions to HTML and JavaScript.  If I ever get time, it would be nice to see if I could determine if any of the newer changes to both would let me code a generic solution.  Since the application runs in a corporate environment, we are able to control the environment.  We have been running since Notes 5.0.11 and IE 5.5 and have worked with Notes 6, 7 and 8 (for almost all users) as well as IE 6 and 7.  The environment requires that the user be running Notes, that the form be run under IE and that the mail program in the IE Internet Options be Notes.  

The MAILTO interface is a bit fragile to say the least.  However it was the only way that we got this function to work.  There have been several attempts to replace it by other groups in the company using a Notes application or web forms written with other functions.  None have been able to duplicate the sliding, dynamic window of monthly data on the form so we are still the tool of choice.  With it we are able to present a form in a 800x600 (minimum) window that has all the information they need to do the work.  The other solutions to date required the user to move through multiple pages or to scroll such that all the data was not visible.  With every new release, I offer up a prayer to St. Murphy that all will go well!

In our environment, the POST action does create an attachment.  For most people it is a POSTDATA.ATT file but for some, we see a ATTnn.XLS file (nn = some number).   The encoding is different but we recognize the type of file when it arrives at the mainframe server and are able to correctly parse it.

In each of the cases with the current problem, the users got new systems that came with Notes 8 installed.  They were running fine on the prior laptop using Notes 7.  I have asked that they  try doing a reinstall of Notes 8 and IE as, in the past, this has corrected a lot of weird errors.  It has not worked thus far in this case.

One final comment on MAILTO.  Do I recommend using it, no.  The original form was written to run from a web server but this required the user to be connected when completing the form.  The MAILTO solution was developed when someone said they had to have the same thing but it had to be usable when they were not connected to the internet.  By generating a response note under Notes this is possible as you can simply create the note and the next time you connect, it is sent for processing.  Enough philosophy for the day.  Back to trying to find what is eating the attachment.

Again, thanks to everyone for the suggestions.  Please keep them coming.  I am chasing each of the links provided just to make sure I have not missed something.
Brilliant! In any of the attempts, did they try to run some client-side vbscript code to create a mail? Here's an example:

http://www.haveworld.blogspot.com/2006/10/vbscript-and-lotus-notes.html

You cannot create the attachment that way, but I suppose that you know other ways to put data in a body-field (like XML).
Avatar of SCMGR3

ASKER

I thought I would post a simple (very simple as the original is almost 2600 lines) form that uses the same submit logic in case anyone wants to play.  You will need to fill in a valid TO address in place of "USERID@Inter.Net.Addr"
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<HTML>
<HEAD>
<TITLE>Test Form</TITLE>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
// <!-- Hide script from older browsers
function submitForm() {
window.document.updateForm.submit();
}
function setUpdateMethod() {
document.updateForm.action =
mailto:USERID@Inter.Net.Addr                  +
"?Subject=Test Data Form"                              +
"&body="                                               +
"In order for this form to be processed successfully " +
"will need to SEND this email and then "               +
"replicate your mail.  "                               +
" There should be an "                                 +
"attachment with this email.  Do not modify or remove "+
"the attachment. "
document.updateForm.encoding = "multipart/form-data";
document.updateForm.method = "POST";
}
// End hiding script from older browsers -->
</SCRIPT>
<BODY ONLOAD="setUpdateMethod();">
<FORM NAME="updateForm">
<P>
Your name:
<INPUT TYPE=TEXT SIZE=30 NAME=Userid VALUE="">
</P><P>
Please select a number, any number:<BR>
<INPUT TYPE=RADIO NAME=Number VALUE="1" CHECKED>1<BR>
<INPUT TYPE=RADIO NAME=Number VALUE="2">2<BR>
<INPUT TYPE=RADIO NAME=Number VALUE="3">3<BR>
<INPUT TYPE=RADIO NAME=Number VALUE="4">4<BR>
<INPUT TYPE=RADIO NAME=Number VALUE="5">5<BR>
<INPUT TYPE=RADIO NAME=Number VALUE="6">6
</P>
</P><P>Please feel free to add any comments you like:<BR>
<TEXTAREA ROWS=5 COLS=72 NAME=Comments></TEXTAREA>
</P>
</FORM>
<P>When you are finished with filling the form, click here:
<INPUT TYPE="button" VALUE="Send" onClick="submitForm();">
</P>
</BODY>
</HTML>                        
On my system, it will create a note under Lotus Notes with the TO address filled in, the Subject line set to "Test Data Form", the note body containing the instructions and an attachment file that, in my case, is named POSTDATA.ATT.  If you view the file you will see delimited sections of data that contains the element name plus the value set.
I replaced the line with the mail-address (in fact I just added some double quotes, I won't send the form anyway), and the form runs, no problem. Neither FF nor IE gave me the attachment I was hoping for, which makes it certain that the Notes installation isn't correctly executed. I'll try to change that tomorrow,  but how... I hate to reinstall clients...
Avatar of SCMGR3

ASKER

This is probably a really DUMB question to the post by sief_bosman, but you did have the Internet Options set in IE to indicate Notes is the email program?  I am running (on this machine) with Notes 7.0.HF277 and IE 7.0,5730.11.  When I press the SEND button, I get a popup from IE warning me that the form is being submitted by email and may expose all kinds of information that I might prefer to keep secret...  When I respond OK, a note is opened in Notes that has all of the note sections populated plus it has a POSTDATA.ATT attachment that contains something like this:

-----------------------------7d917712c007ce
Content-Disposition: form-data; name="Userid"

Old Dog
-----------------------------7d917712c007ce
Content-Disposition: form-data; name="Number"

2
-----------------------------7d917712c007ce
Content-Disposition: form-data; name="Comments"

This is a test
-----------------------------7d917712c007ce--

If you have everything set correctly and get the note but no attachment then, if you do find what is preventing it from being created, I would definitely (as in DEFINITELY) like to know.  I think that it is worse trying to find the setting that will cause the failure when your test system will not fail as opposed to finding what makes it work when you do have the failure.   When this form works it is a great application but when it fails, the environment is one that makes finding the problem difficult.  One case I had was a user who decided to override the normal XP desktop font size.  This change overrode all of the font definitions in the form causing all of the values in the various form fields to appear to be garbage.
No no, the mailto works, I get the mail and the subject and the body in Notes, only the attachment fails (exactly as in this question). This probably can be explained by the way Notes "arrived" on the system I'm working on: I think it was copied from an earlier system to this one, just the full tree (bin + data), and not installed from the CD. I'v recommended it umpteen times here, to reinstall, but since I never had problems I left it be. Until now. I'll go a-CD-hunting for you. And for me, of course...  ;-))
Executed the Repair... didn't help.
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Retested. No problem.

It might be interesting to ask one person to reinstall, and NOT repair.
Avatar of SCMGR3

ASKER

Yes on the reinstall vs. repair.  The person I have testing did the repair type install over the existing Notes 8 and there is no change.  I also have found that she is running IE 7 not IE 6.  I tried the Notes 8/IE 7 and it still works for me.  Now to convince her that she needs to try a full reinstall.
Fingers crossed...

If there's a colleague of yours in France with the same problem, and there's room in your budget, I could... Naaaah... Too expensive, and results not guaranteed.

Better try the reinstall first!
By the way, you didn't give me our opinion on the vbscript example I posted...
Avatar of SCMGR3

ASKER

On the vbscript, I have not had time to really dig into it.  It is something I am going to put away to "play" with when this is over.  At the moment, I am training my replacements.  I've been on this particular project for 14 years.  This is the 3rd attempt to replace the two of us who work on it with cheaper programmers.  The previous attempts used people from Brazil and India.  Seems American contractors are too expensive.  Management is under a mandate to get rid of all American contractors so spending my time, again, training instead of doing much productive work.  

As for someone in France having the problem; if there was, I would be arguing that I HAD to be ON SITE to have a chance to fix this.  <grin>  

Thanks for all the help and suggestions thus far.  I hope to get the user to try a full install tomorrow or over the weekend.  Based on past experiences and your test, I feel that this will resolve it but I have been wrong in the past and probably will be again.
Avatar of SCMGR3

ASKER

Question: repair vs reinstall from the entry "It might be interesting to ask one person to reinstall, and NOT repair" means what?  I thought that there would be an option during the install to reapir an existing installation.  My user is asking what I am talking about as she does not get any such choice.  When I try it the installation over an existing installation does not give any such option.  This could be because the install is being controlled by a package on the corporate web site as opposed to an install from a CD.

According to her, she did the install on top of the existing and nothing changed.  If that is a reinstall, then I am back to the drawing board.

Thanks,
Rollin
Yep, that's the reinstall I meant. AFAIK, in R7, there is the option to repair an installed client, but that usually doesn't help much. Maybe that's why it's left out in R8, I don't know. I haven't done many R8 installations (yet).

So nothing changed... Oh botox... ;-)  And I hate drawing boards...

Some useless links, I found them while searching for solutions:
- http://sharkysoft.com/tutorials/jsa/content/034.html
- http://www.stadtaus.com/forum/t-1594.html   <--- might contain some clues
- http://code.djangoproject.com/ticket/370  ???
- http://forums.powweb.com/showthread.php?t=76551  <--- not mailto, but blabs about a temp. directory ....

Good luck...
Avatar of SCMGR3

ASKER

sjef_bosman

The solution was to uninstall the existing Notes 8 using the Microsoft add/remove programs and then the reinstall Notes from the corporate site - in short a full reinstall from scratch.  There was something in the image created and used to build the user laptops that was either corrupted or contained a configuration option that blocked the attachment creation.   Thank you for all the time you spent on this.  I saved your VBScript solution and want to play with it at some point as I really do not like the MAILTO function - not well defined.
Thank you, thank you! :-))