fred rosenberger wrote:my GUESS is that this isn't doing what you want:
I think you are passing the literal "to[i]" both times, and you WANT to pass "to[0]" and "to[1]". Java doesn't do variable interpolation inside strings like Perl does.
I think you need to do something like
I would suggest you use a lot of System.out.println() statements to see what your code is REALLY doing, assuming you are not using a debugger to step through.
posted Today 10:40:29 AM 0
I think you are passing the literal "to[i]" both times, and you WANT to pass "to[0]" and "to[1]". Java doesn't do variable interpolation inside strings like Perl does.
I think you need to do something like
view plaincopy to clipboardprint?view plaincopy to clipboardprint?
props.getProperty("to[" + i + "]")
props.getProperty("to[" + i + "]")
now the field is populating but on
this exception is coming
send failed, exception: com.sun.mail.smtp.SMTPSendFailedException: 501 5.1.7 Invalid address
;
nested exception is:
com.sun.mail.smtp.SMTPSenderFailedException: 501 5.1.7 Invalid address