Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5418 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have not been succesful in sending mails to multiple recipients using a field containing a comma separated list. I tried modifying the script by adding .parse(to, true) to InternetAddress in msg.setRecipient, but to no avail. Any help/hints would be much appreciated.

Posted

Yes, I did. This is actually my present work-around, but it does mean that a recipient cannot rapidly tell from the email distribution whether others have been addressed too. (In my work-around this information therefore is added to the email subject line, but it looks a bit messy.)

I just thought that Scriptmaster was advertised as providing support for multiple recipients (which I presumed to be using a comma separated list), but unfortunately I cannot get it going with the standard Scriptmaster calls.

Posted

you have to pass an array of InternetAddresses, not a comma separated list.

InternetAddress[] myList=//create the list....

message.addRecipients(Message.RecipientType.TO,myList);

  • 2 weeks later...
Posted

That was a good hint. Much obliged.

As I am using a FM field with a list as the addressees, the coding needed to be a bit more elaborate:

String mailAddressTo=(to);

String[] ToAddresses = mailAddressTo.split("n") ;

InternetAddress[] mailAddress_TO = new InternetAddress [ToAddresses.length] ;

for (int j=0; j

mailAddress_TO[j] = new InternetAddress(ToAddresses[j]);

}

msg.addRecipients(Message.RecipientType.TO, mailAddress_TO);

This topic is 5418 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.