Help, I am trying to send an e mail cc with lotus script
Call doc.Send (False, uidoc.FieldGetText(“txtRecipient”))
I have a CopyTo field in my form and this does indeed send a copy to the cc entry. However if there are 2 entries in the cc field it stops and says can not find entry in the address book ?.
Any ideas ?
Thanks in advance
AMJ
Subject: Doc.Send
If you want to send a mail to multiple recipients you must provide an array to the send method.The fieldgettext method returns mutliple values as 1 single string (names1, names2…) not an array.
I may use the backend value to do that:
doc.send(false, doc.txtRecipient)
Subject: RE: Doc.Send
Hi Ribager,
please call the above mail function to send multiple mails.
Sub mailSend (mailTo As Variant, mailCCTo As Variant, mailBCCTo As Variant,
subject As String, bodyText As String,doc As NotesDocument)
Dim ss As New NotesSession
Dim mailDb As NotesDatabase
Dim mailDoc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim richStyle As NotesRichTextStyle
Set richStyle = ss.CreateRichTextStyle
richStyle.Bold = True
richStyle.NotesColor = COLOR_BLUE
Set mailDb = ss.CurrentDatabase
Set mailDoc = New NotesDocument( mailDb )
Set rtitem = New NotesRichTextItem( mailDoc, "Body" )
Call rtitem.AppendStyle(richStyle)
Call rtitem.AppendText("Dear Sir")
Call rtitem.AddNewline(2)
Call rtitem.AppendStyle(richStyle)
Call rtitem.AppendText("The following document needs your Approval ,
kindly click on the link below to view the document and act upon.")
Call rtitem.AddNewline(2)
Call rtitem.AppendDocLink(doc, "Click to open the file","Please
click here
to open the document.")
Call rtitem.AddNewline(2)
Call rtitem.AppendText("Thanks")
Call rtitem.AddNewline(2)
Call rtitem.AppendText("This is system generated alert")
Call rtitem.AddNewLine(2)
'Call rtitem.AppendStyle(richStyle)
'Call rtitem.AppendText( bodyText )
'Call rtitem.AddNewline(2)
'Call rtitem.AppendDocLink(doc,"Click to open the file","Please
click here
to open the document." )
'Call rtitem.AddNewline(2)
mailDoc.Form = "Memo"
mailDoc.SendTo = mailTo
mailDoc.CopyTo = mailCCTo
mailDoc.BlindCopyTo = mailBCCTo
mailDoc.Subject = subject
Call mailDoc.Send( False )
End Sub
I hope this will help you.
cheers
RAJ