@Service(value="emailService") public class EmailServiceCamelSmtpImpl extends Object implements EmailService
EmailService
interface that uses Apache Camel SMTP component.BEAN
Constructor and Description |
---|
EmailServiceCamelSmtpImpl() |
Modifier and Type | Method and Description |
---|---|
void |
sendEmailToAdmins(String subject,
String body)
Sends email to administrators.
|
void |
sendFormattedEmail(String recipients,
String subject,
String body,
Object... values)
Sends formatted email to recipients.
|
public void sendEmailToAdmins(String subject, String body)
EmailService
sendEmailToAdmins
in interface EmailService
subject
- the subjectbody
- the bodypublic void sendFormattedEmail(String recipients, String subject, String body, Object... values)
EmailService
For example, message "Hi {}. My name is {}.", "Alice", "Bob" will return the string "Hi Alice. My name is Bob.".
sendFormattedEmail
in interface EmailService
recipients
- the comma separated recipients; if empty then email won't be sendsubject
- the subjectbody
- the body with possible placeholders {}
values
- the values for placeholders; count of values have to correspond with count of placeholdersCopyright © 2018 Pivotal Software, Inc.. All rights reserved.