Hello!
I have created a form on the web with a file- upload function. I include the information to a mail and now I want the file to be attatched to the mail. Not as a link to the database (like now)
I´ve made a button with Formula:
@Command([RefreshWindow]);
@Command([FileSave]);
@MailSend (whith required info, mailadress and fields.);[IncludeDoclink]) +@NewLine;
@Command([FileCloseWindow])
How do I include the file as an attatchment and not as a link?
Thanks Sarah
Ps. I would like to redirect to a page in my database after posting the form also… Ds
Subject: File upload attatchment to mail from web
Try code below in your webquery save agent. BTW for redirect lookup $$Return reserved field name in designer help, or lookup using brackets syntax for agents. Hope this helps…
Sub Initialize
On Error Goto MyErr
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim form As String
Set db = s.CurrentDatabase
Set doc = s.DocumentContext
form = doc.Form(0)
'set the values for the message into the document being saved.
Call doc.ReplaceItemValue ("Subject","The Subject")
Call doc.ReplaceItemValue("Body","The Body")
Call doc.ReplaceItemValue ("Form","Memo")
Call doc.Send(False,"Mark Ambler")
'replace the form w/ original form and remove the email fields
Call doc.ReplaceItemValue ("Form",form)
Call doc.RemoveItem("Body")
Call doc.RemoveItem("Subject")
Call doc.Save(True,True)
Print "Done"
Exit Sub
MyErr:
errBody = Lsi_info(2) & " " & Str(Err) & ": " & Error$ & " on line: " & Erl()
Print errBody
Exit Sub
End Sub