Any ideas would be appreciated.
Sent via Deja.com
http://www.deja.com/
The trick is to create a form with the mail fields on it. Body, SendTo, Subject. In the QueryOpen event of that form write a script that sends a message back to
whoever. Then use doc.send (True) to send the form. The True parameter stores the form in the e-mail. That way you are sending the QueryOpen script and it will get
processed when everanyone opens it. You can add date processing to the example here.
Add this to the QueryOpen event of the mail form you are going to mail...
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
On Error Resume Next
If Source.Document.SentReturnReceipt(0) = "0" Then
Dim session As New NotesSession
Dim doc As New NotesDocument( session.CurrentDatabase )
doc.SendTo = source.document.respondto(0)
doc.Form = "Receipt"
doc.Subject = Source.Document.Subject(0)
Call doc.Send(False)
Source.Document.SentReturnReceipt = "1"
Source.Document.SaveOptions = "1"
Call Source.Document.Save(True,True)
Source.Document.SaveOptions = "0"
End If
End Sub
'====================================
'Here is the code I use to send the form
'====================================
Dim session as new notessession
Dim Db as notesdatabase
Dim outgoingDoc As NotesDocument 'Document that gets mailed
set db = session.currentdatabase
Set outgoingDoc = New NotesDocument(db)
outgoingDoc.Principal = uidoc.fieldgettext("Principal") 'This replaces the reply-to address. It replaces the from field.
outgoingDoc.Logo="StdNotesLtr34"
outgoingDoc.SentReturnReceipt = "0"
outgoingDoc.Subject = uidoc.fieldgettext("Subject")
outgoingDoc.SendTo = sendTo 'SendTo is a notes list of receipents
Call outgoingDoc.ReplaceItemValue("_ViewIcon",69)
Call outgoingDoc.Send(True)
HTH,
Jason
This looks great, but the problem (which I forgot to state) is that
these emails go out over the internet...
Bryan
In article <3a685610....@enews.newsguy.com>,
You might be able to write a VBS Script that would run on Mail open but that would only work on Outlook clients. The other way might be to send a javascript HTML page
to the reciepents. The VBS will get shut down by almost every virus program because that's how most worm mail-viruses are spread. And the javascript will only work if
the reciepents e-mail client supports html in the email.
Finally, you may be able to format an HTML page with a form button that posts a message to a domino server but that still requires the user to take action. It's not
automatic (unless you use JS to fire the event)
HTH,
Jason