Forums Register Login

javamail

+Pie Number of slices to send: Send
I set an array of InternetAddresses as the recepient of my message:

msg.addRecipients(MimeMessage.RecipientType.TO, emails);

But than list list shows up in the To field of the email.

Is there anyway to set the recepients like this but have another value appear in the To field of the message?

Thanks,

L
+Pie Number of slices to send: Send
You'd have to use a distribution list set up on your email server.
+Pie Number of slices to send: Send
I ended up creating a loop that sent each address in the list individually. This way each recipient's email only contains their own address and not the entire mail list in the �To� field of the message (my client did not want people to see the entire mail list). This solution makes the code a little more complex, but meets the requirements.

Thanks for replying.
Morning came much too soon and it brought along a friend named Margarita Hangover, and a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 693 times.
Similar Threads
Mocking injected Dependencies
Asigning value to text box if used
Popup windows with dynamic content using struts
B&S: Do you show the Flag field and what is really meant by it?
JTextField in JScrollPane
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:03:25.