Reputation: 31
I have already the lotusscript code which is working correctly But now i have to add one more email id in the Recipient for the below code
Current Code:
Call currdoc.Save(True, False)
Set maildoc2 = New NotesDocument(maildb)
maildoc2.Form = "Menu"
maildoc2.Type = "Color Code"
maildoc2.SendTo = "[email protected]"
maildoc2.Recipients = "[email protected]"
maildoc2.From = "FRIENDS/COLOR"
maildoc2.Body = "This automated email message"
I tried to add one more email id as [email protected]
using two ways and it is still not working.
first way:
Call currdoc.Save(True, False)
Set maildoc2 = New NotesDocument(maildb)
maildoc2.Form = "Menu"
maildoc2.Type = "Color Code"
maildoc2.SendTo = "[email protected]",[email protected]
maildoc2.Recipients = "[email protected]",[email protected]
maildoc2.From = "FRIENDS/COLOR"
maildoc2.Body = "This automated email message"
Second Way is like this by creating address code.
Dim addressesss (1 To 2) As String
addressesss(1) = "[email protected]",
addressesss(2) = "[email protected]"
Set maildoc2 = New NotesDocument(maildb)
maildoc2.Form = "Menu"
maildoc2.Type = "Color Code"
maildoc2.SendTo = addressesss
maildoc2.Recipients = addressesss
maildoc2.From = "FRIENDS/COLOR"
maildoc2.Body = "This automated email message"
So can anyone tell me what correction need to done for above code such that the emails will be sent to both the email ids and thanks for your help and time.
Now currently the emails are not sending it to the particular recipients.
Upvotes: 0
Views: 515
Reputation: 22266
The second way is correct, but perhaps you have a typo in your second email address?
Dim addresses (1 To 2) As String
addresses(1) = "[email protected]",
addresses(2) = "[email protected]"
Set maildoc2 = New NotesDocument(maildb)
maildoc2.Form = "Menu"
maildoc2.Type = "Color Code"
maildoc2.SendTo = addresses
maildoc2.Recipients = addresses
maildoc2.From = "FRIENDS/COLOR"
maildoc2.Body = "This automated email message"
Upvotes: 1