Last post Jan 18, 2010 02:10 PM by amitchandnz
Jan 18, 2010 01:59 PM|yan19454|LINK
I am using the code to send email. But it have limitation. If I need to send to 5 people, how I can put five email into this code . Thx.
Jan 18, 2010 02:10 PM|amitchandnz|LINK
You could pass an ArrayList to the stored procedure. First build an array as follows:Dim myarraylist As New ArrayListmyarraylist.add(email1)myarraylist.add(email2)myarraylist.add(email3)myarraylist.add(email4)myarraylist.add(email5)Now pass the array list to the stored procedure:Public Sub SendMailMessage(ByVal from As String, ByVal recepient As ArrayList, ByVal bcc() As String, ByVal cc() As String, ByVal subject As String, ByVal body As String)
Now loop through the array and add to the To email address as follows:
Dim torecepient As String
For Each torecepient In recepient