you can send mail by using transport service here is the cod for example
public void sendEmail(String emailBody, String emailRecipients, String subject){
try {
String[] toAddress = parseArray(emailRecipients);
String from = (FROM_ADDRESS);
if (toAddress != null) {
for (int i = 0; i < toAddress.length; i++) {
String address = (String) toAddress[i];
m_transportService.sendText(emailBody, subject, address, from);
}
}
} catch (Exception e) {
getLogger().log(LogLevel.WARN, e.getMessage());
}
}
No comments:
Post a Comment