List of usage examples for com.amazonaws.services.simpleemail.model Destination withBccAddresses
public Destination withBccAddresses(java.util.Collection<String> bccAddresses)
The recipients to place on the BCC: line of the message.
From source file:org.springframework.cloud.aws.mail.simplemail.SimpleEmailServiceMailSender.java
License:Apache License
private SendEmailRequest prepareMessage(SimpleMailMessage simpleMailMessage) { Destination destination = new Destination(); destination.withToAddresses(simpleMailMessage.getTo()); if (simpleMailMessage.getCc() != null) { destination.withCcAddresses(simpleMailMessage.getCc()); }/*from ww w . j a v a2s . c om*/ if (simpleMailMessage.getBcc() != null) { destination.withBccAddresses(simpleMailMessage.getBcc()); } Content subject = new Content(simpleMailMessage.getSubject()); Body body = new Body(new Content(simpleMailMessage.getText())); SendEmailRequest emailRequest = new SendEmailRequest(simpleMailMessage.getFrom(), destination, new Message(subject, body)); if (StringUtils.hasText(simpleMailMessage.getReplyTo())) { emailRequest.withReplyToAddresses(simpleMailMessage.getReplyTo()); } return emailRequest; }