Hjælp til sub
HejJeg har to subs og i den ene af de to subs kalder jeg på nr 2
men jeg får en fejl
Fejltype:
Microsoft VBScript runtime (0x800A01C2)
Wrong number of arguments or invalid property assignment: 'SendMail'
/includes/html.asp, line 265
Koden:
Sub SendMailBookingMail(ObjArray, StratTime, EndTime, strDate)
dim strEmailText, t, strSQL, strEmailTitel, strEmailTextDb, strEmail
objIdArray = split(ObjArray,",")
strSQL = "select emailtext from emailtext where Emailname = 'BookingMail'"
Set rsRecords = objConn.Execute(strSQL)
strEmailTitel = "Booking fra Zilo"
strEmailTextDb = rsRecords("emailtext")
For t = LBound(objIdArray) to UBound(objIdArray)
strEmailTextDb = strEmailText
strSQL = "select name, email from objects where id = " & objIdArray(t)
Set rsRecords = objConn.Execute(strSQL)
If Len(rsRecords("email")) <> 0 Then
strEmail = rsRecords("email")
'{Navn}
strEmailText = Replace(strEmailText,"{Navn}", rsRecords("name"))
'{Titel}
strEmailText = Replace(strEmailText,"{Titel}", strTitel)
'{Dato}
strEmailText = Replace(strEmailText,"{Dato}", strDate)
'{StartTid}
strEmailText = Replace(strEmailText,"{StartTid}", StratTime)
'{SlutTid}
strEmailText = Replace(strEmailText,"{SlutTid}", EndTime)
Call SendMail(strEmail, strTitel, strEmailText)
End If
Next
End Sub
Sub SendMail(strEmail, strTitel, strEmailText)
Response.Write(strEmail & "<br>" & strTitel & "<br>" & strEmailText & "<br><hr>")
End Sub
