Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: Web Services array input
Feedback Type: Question
Product Area: Domino Designer on Eclipse (DDE)
Technical Area: Functionality
Platform: ALL
Release: 8.5.1
Reproducible: Not applicable

How do I code a LotusScript web service to accept a multivalued (array) input? I have a web service that simply sends an email given recipient, subject, and body text. This works as written but I want to modify it to accept multiple recipients. Not sure how to approach this? Any hints appreciated. Here's the code...



Dim s As NotesSession

Class SendEmail
Sub NEW
Set s = New NotesSession
End Sub

Function SendEmail(UserName As String, Password As String, SendTo As String, Subject As String, Body As String) As String

On Error Goto oops

Dim db As NotesDatabase
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim msg As String

If UserName <> "Username" Or Password <> "Password" Then
SendEmail = "Login credentials incorrect. User not authenticated."
Exit Function
End If

If Subject = "" Then
SendEmail = "Subject is required"
Exit Function
End If

If Body = "" Then
SendEmail = "Body is required"
Exit Function
End If

If Not s.CurrentDatabase.IsOpen Then
SendEmail = "Couldn't open database"
Exit Function
End If

Set doc = s.CurrentDatabase.CreateDocument
doc.Form = "Memo"
doc.Principal = "no-reply@company.com"
doc.InetFrom = "no-reply@company.com"
doc.From = "no-reply@company.com"
doc.Subject = Subject
Set rtitem = New NotesRichTextItem(doc, "Body")
rtitem.AppendText(Body)
On Error Goto sendoops
Call doc.Send(False, SendTo)
On Error Goto oops
SendEmail = "Message successfully sen!"

Exit Function
oops:
msg = Error$ & " on " & Cstr(Erl)
Msgbox msg
SendEmail = msg
Resume done
sendoops:
msg= "Couldn't send message: " & Error$
Msgbox msg
SendEmail = msg
Resume done
done:
End Function

End Class


Feedback number WEBB83329U created by ~Dan Umfanaverobu on 02/27/2010

Status: Open
Comments:

Web Services array input (~Dan Umfanavero... 27.Feb.10)
. . Most obvious answer (~Olga Chunivitc... 27.Feb.10)
. . Other option (~Olga Chunivitc... 27.Feb.10)
. . if you have used %INCLUDE "lsxsd.ls... (~Howard Minapul... 28.Feb.10)
. . . . Complex Data Types (~Ethan Kiresabu... 12.Apr.11)
. . . . . . any news on this (~Joseph Dwoluvi... 26.Jun.13)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS