/** * Sets subject in msgToSet from subject in emailWithData. * * @param emailWithData {@link Email} with data * @param msgToSet {@link MimeMessage} to set data into. * @throws MessagingException if there is a failure */ private void setSubject(final Email emailWithData, final MimeMessage msgToSet) throws MessagingException { if (emailWithData.subjectEncoding() != null) { msgToSet.setSubject(emailWithData.subject(), emailWithData.subjectEncoding()); } else { msgToSet.setSubject(emailWithData.subject()); } }
@Override public Email clone() { return create() // from / reply-to .from(from()) .replyTo(replyTo()) // recipients .to(to()) .cc(cc()) .bcc(bcc()) // subject .subject(subject(), subjectEncoding()) // dates .sentDate(sentDate()) // headers - includes priority .headers(headers()) // content / attachments .storeAttachments(attachments()) .message(messages()); }
/** * Sets subject in msgToSet from subject in emailWithData. * * @param emailWithData {@link Email} with data * @param msgToSet {@link MimeMessage} to set data into. * @throws MessagingException if there is a failure */ private void setSubject(final Email emailWithData, final MimeMessage msgToSet) throws MessagingException { if (emailWithData.subjectEncoding() != null) { msgToSet.setSubject(emailWithData.subject(), emailWithData.subjectEncoding()); } else { msgToSet.setSubject(emailWithData.subject()); } }
@Override public Email clone() { return create() // from / reply-to .from(from()) .replyTo(replyTo()) // recipients .to(to()) .cc(cc()) .bcc(bcc()) // subject .subject(subject(), subjectEncoding()) // dates .sentDate(sentDate()) // headers - includes priority .headers(headers()) // content / attachments .storeAttachments(attachments()) .message(messages()); }