Mailsend function crashes Lotus Notes

When I execute this code, Lotus displays the notice, if i want to trust the signer of the code! When i choose the option “start trusting the signer …” I receive red error window with error message and Lotus crashes! The code is following:

@Command([RefreshParentNote]);

usermail:=@GetField(“fUserMail”);

mailadmins:=@DbLookup(“”:“NoCache”;“”:“”;“view_settings”;“mailadmins”;2);

mailapprovers:=@DbLookup(“”:“NoCache”;“”:“”;“view_settings”;“mailapprovers”;2);

to:=usermail:mailadmins;

cc:=mailapprovers;

text:="Oracle responsibility agreement: ";

status:=@GetField(“fStatus”);

responsibility:=@GetField(“fResponsibility”);

admin:=@GetField(“fAdmin”);

@If(status=“Allow resp.”;status:=“Allowed”;status:=“Rejected”);

@MailSend(to;cc;“”;“Responsibility note”;“Your request has been processed:”;+@NewLine+"Responsibility: "+responsibility+@NewLine+"Status: "+status+@NewLine+"Remark: "+fNAReason+@NewLine+@NewLine+“Your request has been processed by “+admin;””);

You do not know the context, but maybe you are able to tell me, what’s wrong here!

Subject: RE: Mailsend function crashes Lotus Notes

I think that perhaps you’ve got a semi-colon in the wrong place in your @Mailsend formula. THe way you’ve got it, the bodyFields paramater contains:

+@NewLine+"Responsibility: "+responsibility+@NewLine+"Status: "+status+@NewLine+"Remark: "+fNAReason+@NewLine+@NewLine+"Your request has been processed by "+admin;

I’m guessing that this should actually be part of the remarks parameter? Try moving the sem-colon so that your @Mailsend looks like this:

@MailSend(to;cc;“”;“Responsibility note”;“Your request has been processed:”+@NewLine+"Responsibility: "+responsibility+@NewLine+"Status: "+status+@NewLine+"Remark: "+fNAReason+@NewLine+@NewLine+“Your request has been processed by “+admin;;””);

Please post back with your results.

Emily.

Subject: RE: Mailsend function crashes Lotus Notes

Ahh that’s strange … When I have testet the functionality without the semicolon, it has raised the same error! But only once … Now it’s working. So i do not know, if the problem was semicolon, or the error is going to occure randomly!

Btw, the error says something about wrong handle … I do not remember exactly …

Anyway, thx for your responses

Subject: RE: Mailsend function crashes Lotus Notes

there is nothing wrong there, the ECL dialog will tell you what it is that is causing the problem. The red box message might too. You are using @command([refreshparentnote]) which means you are running it in a dialog, which I don’t think you mentioned. I would guess that the modal dialog is arguing with something else which wants to be modal (i.e. both are trying to be at the top and blocking other activities)

Subject: oh, and don’t use NoCache for non-volatile data.