/** * Sets current date as the sent date. * * @return this * @see #sentDate(Date) */ public Email currentSentDate() { return sentDate(new Date()); }
/** * Sets sent date in msgToSet with sent date from emailWithData. * * @param emailWithData {@link Email} with data * @param msgToSet {@link MimeMessage} to set data into. * @throws MessagingException if there is a failure */ private void setSentDate(final Email emailWithData, final MimeMessage msgToSet) throws MessagingException { Date date = emailWithData.sentDate(); if (date == null) { date = new Date(); } msgToSet.setSentDate(date); }
@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 current date as the sent date. * * @return this * @see #sentDate(Date) */ public Email currentSentDate() { return sentDate(new Date()); }
/** * Sets sent date in msgToSet with sent date from emailWithData. * * @param emailWithData {@link Email} with data * @param msgToSet {@link MimeMessage} to set data into. * @throws MessagingException if there is a failure */ private void setSentDate(final Email emailWithData, final MimeMessage msgToSet) throws MessagingException { Date date = emailWithData.sentDate(); if (date == null) { date = new Date(); } msgToSet.setSentDate(date); }
@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()); }