How do i send email to multiple recipients? HEP!

Hi pardon me i am very new to lotus and was given this assignment. I need to create a form to send it out as email. currently i am only able to send it to one recipient at different field SendTo, CopyTo and BlindCopyTo. what should i do so that i can send it to multiple recipients? HELP!!!

Below will be my source code:

Sub Click(Source As Button)

Dim ws As New NotesUIWorkspace

Dim doc As NotesDocument

Dim arrSendTo(0 To 1) As String

Dim arrCopyTo(0 To 1) As String

Dim arrBlindCopyTo(0 To 1) As String

Dim txtSubject As String

Dim txtBody As String

Set doc = ws.CurrentDocument.Document



'Set mail memo fields

 Dim workspace As New NotesUIWorkspace

 Dim uidoc As NotesUIDocument 

 Set uidoc = workspace.CurrentDocument

 arrSendTo(0) = uidoc.FieldGetText("pSendTo")	

 arrCopyTo(0) = uidoc.FieldGetText("pCopyTo")

 arrBlindCopyTo(0) = uidoc.FieldGetText("pBlindCopyTo")

 Print arrSendTo(0)

 Print arrCopyTo(0)

 Print arrBlindCopyTo(0)



'this is for subject

 txtSubject = uidoc.FieldGetText("pSubject")

 Print txtSubject

'this is the body field

 txtBody = uidoc.FieldGetText("pBody")

 Print txtBody



'Sending the mail

 If fnTest(arrSendTo,arrCopyTo,arrBlindCopyTo,_

 txtSubject,txtBody,doc) Then



'Success

 Messagebox "Success! E-mail has been send"

Else

'Failure	

 Messagebox "Fail! Unable to send this E-mail"

End If

End Sub

Subject: how do i send email to multiple recipients? HEP!!!

Try to use this code…it will help you


Sub Click(Source As Button)

Dim ws As New NotesUIWorkspace

Dim doc As NotesDocument

Dim arrSendTo() As Variant

Dim arrCopyTo() As Variant

Dim arrBlindCopyTo() As Variant

Dim txtSubject As String

Dim txtBody As String



Set doc = ws.CurrentDocument.Document

'Set mail memo fields

Dim workspace As New NotesUIWorkspace

Dim uidoc As NotesUIDocument 

Set uidoc = workspace.CurrentDocument

'this is for subject

txtSubject = uidoc.FieldGetText("pSubject")

'this is the body field

txtBody = uidoc.FieldGetText("pBody")



Set rtitem=New NotesRichTextItem(doc,"Body")

doc.Form="Memo"	

doc.PostedDate= Now()

doc.ComposedDate= Now()

doc.DeliveryDate= Now()



For i=0 To Ubound(doc.pSendTo)

	Redim Preserve arrSendTo(i+1)

	arrSendTo(i)=doc.pSendTo(i)

Next

doc.SendTo=arrSendTo



For i=0 To Ubound(doc.pCopyTo)

	Redim Preserve arrCopyTo(i+1)

	arrCopyTo(i)=doc.pCopyTo(i)

Next

doc.CopyTo=arrCopyTo



For i=0 To Ubound(doc.pBlindCopyTo)

	Redim Preserve arrBlindCopyTo(i+1)

	arrBlindCopyTo(i)=doc.pBlindCopyTo(i)

Next

doc.BlindCopyTo=arrBlindCopyTo



doc.Subject=txtSubject

Call rtitem.AppendText(txtBody)

Call doc.Send(True)

End Sub


Subject: RE: how do i send email to multiple recipients? HEP!!!

Hi, Thanks for the help. Your code do allow me to send to multiple recipients. But there is one problem. When i send to a@hotmail.com, b@hotmail.com both a and b will received 2 of the same email. What can i do to prevent that from happening?

Subject: RE: how do i send email to multiple recipients? HEP!!!

Hi. Thanks it is working perfectly now. This is because i call the memo two times. thanks alot.