guys, i have a module called sending which contains a function to send emails through notes.
i am trying to call this module from a form passing only 1 argument and it works !!!!!!!!. HOWEVER, if i try to send more than one i cant.
can somebody hlp me, pls.
this is the code in the form:
this is the code in the module:
thx, max.
i am trying to call this module from a form passing only 1 argument and it works !!!!!!!!. HOWEVER, if i try to send more than one i cant.
can somebody hlp me, pls.
this is the code in the form:
Code:
sending.sending(arg1,arg2)
this is the code in the module:
Code:
Function Sending(arg1 As String, arg2 as string)
', status As String, receiver As String, description As String)
Dim nSession As Object
Dim CurrentUser As String
Dim DataBaseName As String
Dim nDatabase As Object
Dim nMailDoc As Object
Dim nSendTo(60) As String 'array for 60 e-mail address
Dim EmbeddedObj As Object
Set nSession = CreateObject("Notes.NotesSession")
CurrentUser = nSession.username
DataBaseName = left$(CurrentUser, 1) & Right$(CurrentUser, _
(Len(CurrentUser) - InStr(1, CurrentUser, " "))) & ".nsf"
Set nDatabase = nSession.GETDATABASE("", DataBaseName)
Call nDatabase.OPENMAIL
On Error GoTo ErrorLogon
' See if user is logged on yet;
' if not, the error handler will kick in!
Set nMailDoc = nDatabase.CreateDocument
On Error GoTo 0
With nMailDoc
nSendTo(0) = "max@aaaaa"
.Form = "Memo"
.Body = Chr(13) & Chr(13) & Chr(13) & Chr(13) & _
"Status: " & arg2 & Chr(13) & _
"Description: description"
.sendto = nSendTo
.Subject = "Task: " & arg1 & " has been "
.Importance = "0"
.SEND (False)
End With
Set nDatabase = Nothing
Set nMailDoc = Nothing
Set nSession = Nothing
Set EmbeddedObj = Nothing
MsgBox "The email has been sent."
ErrorLogon:
If Err.Number = 7063 Then
MsgBox "Please login to Lotus Notes first and then click the 'SAVE' button.", vbCritical
Set nDatabase = Nothing
Set nMailDoc = Nothing
Set nSession = Nothing
Set EmbeddedObj = Nothing
Exit Function
End If
End Function
thx, max.