How does pick the current document information and send with mail on web environment

Dear Friend’s

When we try to send a mails through the web, I had a hard time to isolation how to send current document information with the mail on web the environment. That means when New document is saved, New document information is needed to be routed with the mail on web the environment. It is not possible me to do on web environment .

PLEASE CAN YOU HELP ME

Example which is explain below is run fine and send a mail message to this address pradeep@kingslake.com. if the address is hard coded.

If we want to pick “sent to” address from the current form which is entered by the user according to the customer requirement .

How does pick the send to address from the form and put into the agent

Please Help

Thanking in advance

This example is worked when address is hard coded . But I want to pick the address from the current document.

  1. When the user want to save the Form on web , what they do is click the action call

“SAVE DOCUMENT” on the same Form.

  1. “SAVE DOCUMENT” action is used this formula @Command[FileSave]

  2. Once the save is done

  3. Then Activate the @Command([ToolsRunMacro];“MAIL7”) in WebQuerySave Event on the form and run the MAIL7 Agent.

  4. MAIL7 agent coding is

    Dim session As New notessession

    Dim db As notesdatabase

    Set db = New notesdatabase(“devHub/Kes” ,“”)

    Dim doc As notesdocument

    Set db = session.currentdatabase

    Set doc = session.documentcontext

    Set doc = New NotesDocument(db)

    doc.form=“ticket”

    doc.SendTo =”pradeep@kingslake.com"

    doc.CopyTo=”pradeep@kingslake.com”

    doc.Subject =“New Topic”

    doc.body =“New Topic”

    Call doc.send(False)

How does pick the send to address from the form and put into the agent

Subject: How does pick the current document information and send with mail on web environment

Here’s the root of your problem:

Set doc = session.documentcontext

Set doc = New NotesDocument(db)

The second set doc creates an entirely new, blank document which replaces the first one, which contains all the data. What you need to do is to declare a second document (say, doc_mail) and set the SendTo address, subject, and so on for that one rather than doing things to doc, which you’ll want to keep around as a data source. There are several ways to get data from your source document (doc) to the mail message that you want to send (doc_mail). For a somewhat more complicated but very comprehensive way of doing it, search the help for the CopyItemToDocument method. You’ll probably want to read up on the NotesItem class as well.

Subject: RE: How does pick the current document information and send with mail on web environment

Dear M RiggsbyThank you for the details which you have submit.

If it is possible can you send me live coding

to the relevant example.

Field name is sendone which data need to be transferred from current document to the mailing document .

Thank in advance ( please help)