Send mail Using RTC sdk
One answer
ok.. what is the question?
here is the method definition
public void sendMail(MailSender sender, String toAddress, String subject, String msg, String cc) throws MessagingException;
and a sample use
<p>
try {
IMailerService mailerService = getService(IMailerService.class);
mailerService.sendMail(mailerService.getDefaultSender(), "toAddress", "subject", "msg", "cc");
}
catch(Exception ex)
{
System.out.println("exception="+ ex.getMessage());
}
</p>
here is the method definition
public void sendMail(MailSender sender, String toAddress, String subject, String msg, String cc) throws MessagingException;
and a sample use
<p>
try {
IMailerService mailerService = getService(IMailerService.class);
mailerService.sendMail(mailerService.getDefaultSender(), "toAddress", "subject", "msg", "cc");
}
catch(Exception ex)
{
System.out.println("exception="+ ex.getMessage());
}
</p>
Comments
Hi Sam,
I have done same thing in my code. It's not giving any exception, but the problem is that the email is not getting triggered. Do I need to do any server configuration settings? Any property I need to set? SMTP configuration(like server port, server name)? .
you have to configure the server to be able to send mail at all.
see the JTS/Admin, Email configuration
server:port/jts/admin#action=com.ibm.team.repository.admin.configureMailSettings