How to send 20 mail?

Hi i got one problemI need to send about 20 mails with attachments in the same time.Has anyone has idea how to do it.Thanks
[144 byte] By [boske3a] at [2007-11-27 9:55:08]
# 1

I'm not sure what's confusing you. Do you know how to send one message?

Just repeat that code 20 times, or put it in a loop.

You can do it more efficiently if you manage the Transport object explicitly,

rather than relying on the Transport.send method. Connect the Transport

before sending the first message and close it after sending the last message.

See the JavaMail FAQ.

bshannona at 2007-7-13 0:25:15 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Well problem is a kind a different.I have 20 different mail addresses and all of them has it`s own attach,

for example:

some@mail.com has attach c:\attach1.zip

some1@mail.net has attach c:\attach2.zip

...

some20@ps.com has attach c:\attach20.zip

so the loop is not a solution ,the fact is that i can put it 20 time, different code with different paramaters and to send it.

But this second stuff with this Transport object,can you give more informations on it or samoe links or maybe some code? if you have.

Thanks for help

boske3a at 2007-7-13 0:25:15 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Did you even look at the FAQ? http://java.sun.com/products/javamail/FAQ.html#rptsend
bshannona at 2007-7-13 0:25:15 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...