Bit stuck (as usual). Below code works fine when one checkbox is ticked to receive by email or when the other checkbox is ticked to receive literature through post. But would like an additional option that will send to both “emails@mycompany.com” & “postouts@mycompany.com” when BOTH checkboxes are ticked (i.e. checkpost & checkmail). Can’t seem to get it to work properly for all three scenarios.
Subject: Lotusscript (Web) E-mail agent Sent To 3 Recipients
Dim recipients
recipients = ""
'Set up the recipients
If parameters("checkemail") = "By email" Then
recipients = recipients & {,emails@mycompany.com}
End If
If parameters("checkpost") = "By Post" Then
recipients = recipients & {,postouts@mycompany.com}
End If
'no recipients
if recipients = "" then exit sub
recipients = Fulltrim(Split(recipients, {,}))
memo.ReplaceItemValue {SendTo}, recipients
Subject: RE: Lotusscript (Web) E-mail agent Sent To 3 Recipients
don’t mean to be rude but i’d suggest you point in the R5 forum next time. if you’re going to continue to post in here and expect R5 code you should mention that it’s for R5 (you sleected 6.5.5 as your version?).
Dim recipients
recipients = ""
'Set up the recipients
If parameters("checkemail") = "By email" Then
recipients = recipients & {,emails@mycompany.com}
End If
If parameters("checkpost") = "By Post" Then
recipients = recipients & {,postouts@mycompany.com}
End If
'no recipients
If recipients = "" Then Exit Sub
memo.ReplaceItemValue {SendTo}, recipients
recipients = Evaluate({@trim(@explode(sendto, ","))}, memo)
memo.ReplaceItemValue {SendTo}, recipients