This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Group Email support in java mail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Group Email support in java mail" Watch "Group Email support in java mail" New topic

Group Email support in java mail

Sathwik Raju

Joined: Jun 02, 2005
Posts: 4

Does javamail support group addresses ? I've got few groups created in outlook like *xxxGroup where few email addresses were added to the group. I would like to use this group name instead of actual email addresses in java mail.
I am aware that every group will have smtp email address but I do not want to use smtp address and would like use the group name as it is. Is javamail api capable of finding email addresses in the group ?

Can any one tell whether javamail supports this ?

Thanks in advance
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

That is something that you could try out fairly easily, isn't it?
Sathwik Raju

Joined: Jun 02, 2005
Posts: 4
Thanks Paul,

I already tried but didnt work. May be I have to frame my question whether there is any solution to pick email addresses from the group if javamail doesnt support this ?

Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

JavaMail supports any address that is RFC822 compliant (assuming you are using an SMTP transport?). If you are connecting to the server where the distribution list is defined (if indeed they are defined on the server and not in an MUA like Outlook) then this should work. What goes wrong? Do you get a AddressException? Or does the server complain that the address is unknown?
[ July 06, 2006: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: Group Email support in java mail
It's not a secret anymore!