This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Multiple email recepients Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Multiple email recepients" Watch "Multiple email recepients" New topic
Author

Multiple email recepients

Sundeep Malali
Greenhorn

Joined: Aug 20, 2003
Posts: 3
Hi,
I am using sockets to send email from my application. When the 'To' list has only one address, then the email is delivered properly. But in case of multiple recipients, the email does not reach any of them. I have tried delimiting the addresses using both , and ; . But nothing works. Is there something extra I need to do in case of multiple recipients.
Thanks in advance.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24057
    
  13

If you mean you're opening a socket to port 25 and sending SMTP commands, what you should do is to put each recipient on a separate RCPT TO: line.


[Jess in Action][AskingGoodQuestions]
Van Glass
Ranch Hand

Joined: Nov 18, 2000
Posts: 110
The To: and Cc: headers are really for display purposes by the email client. For each recipient you must issue a RCPT TO command to the SMTP server.
e.g.
RCPT TO <user@domain.com>
RCPT TO <user2@domain.com>
RCPT TO <user3@domain.com>
hope this helps.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Multiple email recepients
 
Similar Threads
javamail with to: list repeated
E-mail notification using servlets
Sending Email in java through MS Exchange Server
java mail:How to send CC & BCC?
multiple recipients