Louis Kenneth Dorado
Louis Kenneth Dorado

Reputation: 19

How do I get Lotus Notes @MailSend to send an exact copy of my form?

For example, I am the buyer that wants to rate a seller.

I have this sample evaluation of a seller.

Sample Evaluation

I need to send an email to the seller, Eden F. De Leon, an exact copy of the sample form.

However, all I can do is this code.

{`@MailSend
(Seller;
Buyer;
"";
"Rating for: " +Seller;
"";
"Sales evaluation for : " +Seller
+@NewLine+
"Buyer : " +Buyer
+@NewLine+
"Performance : " +Performance
+@NewLine
+@NewLine+
"Areas for Improvement:"
+@NewLine+
"1. " +Development1+ " - " +Rate1
+@NewLine+
"2. " +Development2+ " - " +Rate2
+@NewLine+
"3. " +Development3+ " - " +Rate3
+@NewLine
+@NewLine+
"Recommendation : " +Recommendation
`}

This will send an email notification like this.

email notification

What can I do to send an email notification which looks exactly the same as Sample Form. Thanks.

Upvotes: 0

Views: 1260

Answers (1)

Richard Schwartz
Richard Schwartz

Reputation: 14628

From the IBM documentation for @Mailsend

@MailSend (Formula Language)

There are two ways to use @MailSend:

When used with no parameters, @MailSend mails the current document (the one being processed when the @function is evaluated) to the recipient designated in the document's SendTo field.

The document must have a SendTo field.

When used with one or more parameters, @MailSend composes a new mail memo

etc., etc., etc....

You are using the second way, with parameters in the @MailSend call, so you are composing a new mail memo instead of mailing the current document.

You should either be using the first way, or you should be using LotusScript and the NotesDocument.send() method instead of a @Mailsend. Since your question is about @Mailsend, I'll continue my answer for that - but I'll come back to a final comment about using LotusScript at the end.

You will need to assign the recipient's address to the SendTo field before you call @MailSend. If your form doesn't have a SendTo field, add one. You can make it a hidden field. It will still work.

The user will be reading the email in his or her mail file, and your form is in your application's NSF file, so in order for the user to actually see the document that you emailed, you will also have to do one of two things:

  • Install a copy of your form in the mail template and apply that template to every recipient's mail file.
  • Or set the "Store form in document" property on your form.

There are pros and cons to each of these choices. Updating the template requires the cooperation of your server administrators, and it has to be done again after any upgrade to the Domino software. It's a pain, but ultimately it uses less storage and causes fewer problems for you as an app developer. Using 'Store form in document' doesn't impose any burden on your admins, but since both the emailed and the saved copy of the document will have the stored form this will use more storage space (not a lot, though). The bigger problem is that it will make it harder for you to maintain your app because any changes you make to the form in the future will not be reflected in documents that are already saved. (Sometimes this is a good thing, but usually it's not.) There's a way around that, though, by using an agent to delete the stored form from every document, which also recovers the extra space that has been used.

With LotusScript and the NotesDocument.Send() method, you have the ability to store the form in the email without storing it in the document that's saved in your app's NSF file. This is really the best approach in most cases.

Upvotes: 1

Related Questions