• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with java mail

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
My application is a java batch application, which executes certain batch of work and sends a status mail once the batch of work is done. I am using java mail to send the email. My mail client is Lotus Notes. If i give the group name in the "To" block, the mail class does not throw any exception and runs fine but i do not recieve the status mail. If i give my mail id in the "To" block, it sends me a status mail.

In short, i am not able to send emails to a particular group through java mail. can anybody let me know what's the problem.

Thanks in advance

Regards
Makarand Parab
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I making an educated guess here because I've used the JavaMail API and I don't think there's a concept of groups. When you send mail to a group using Lotus Notes, the group is converted to individual addresses by the Lotus Notes client before sending to the outgoing mail server. When you use JavaMail, there's no code to translate the group into individual addresses.
 
Makarand Parab
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Thanks for the reply, but i have a query. Is there any way to send mail to multiple user. If i try to put comma seperated mail id's it gives error saying [Invalid string]. Is there any way out or shd comma seperated mail id's should work.
Id there is any good example live on net to send mails to multiple users using java mail, plz do let me know. I would highly appreciate it.

Thz in advance

Regards
Makarand Parab.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also want to know besides looping through all the recipients' addresses one by one what else can we do.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


In short, i am not able to send emails to a particular group through java mail.


A "group" in Notes (if I remember right) is not an address as such, rather a type of document, yes? So a group does not represent a recognizable address as far as SMTP is concerned - there is some conversion going on on the server (as Rovas Kram points out).

You can't use a CVS list of addresses, because Java Mail's InternetAddress class will parse the CSV to make sure it is RFC822 complient. But look at the Transport class's send methods - you'll notice that two take an array of InternetAddresss. Presuming you know the addresses in the Lotus Group, you can send to all of them this way.

I have a vague memory that there is an IBM supplied transport implementation for Lotus which ships with Domino. You might like to search IBM's site for such a thing - if there is it might let you use groups directly.
 
reply
    Bookmark Topic Watch Topic
  • New Topic