Posted By:
thanuksha_kaviratne
Posted On:
Friday, June 20, 2008 04:20 AM
i used java mail api to send mails. the code is a s below javax.mail.Session mailSession=(javax.mail.Session)ctx.lookup("java:/Mail"); mailSession.setDebug(false); javax.mail.Message msg = new javax.mail.internet.MimeMessage(mailSession); msg.addRecipients(javax.mail.Message.RecipientType.TO, addressToArr); msg.setSubject(mailSubject); msg.setContent(mailBody, contentType); javax.mail.Transport.send(msg); But if there is an invalid address in the recipient address array, the email won't sent to the correct addresses as well. i just want to know whther it happens any coding issues
More>>
i used java mail api to send mails. the code is a s below
javax.mail.Session mailSession=(javax.mail.Session)ctx.lookup("java:/Mail");
mailSession.setDebug(false);
javax.mail.Message msg = new javax.mail.internet.MimeMessage(mailSession);
msg.addRecipients(javax.mail.Message.RecipientType.TO, addressToArr);
msg.setSubject(mailSubject);
msg.setContent(mailBody, contentType);
javax.mail.Transport.send(msg);
But if there is an invalid address in the recipient address array, the email won't sent to the correct addresses as well. i just want to know whther it happens any coding issues or our mail server implementation.
<<Less